swift open url
guard let url = URL(string: "http://www.google.com") else {
return //be safe
}
if #available(iOS 10.0, *) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
UIApplication.shared.openURL(url)
}
Also in Swift:
- how to change background color of stackview swift
- Get the length of a String swift
- fnb swift code
- swift uitextfield only numbers keyboard lock programmatically
- predicate realm bool swift
- Expression of type 'UIViewController?' is unused warning when pop view controller in swift 3.0
- swiftui font color
- use alamofire to login in swift 5
- set button programmatically swift
- Core Data Quickest way to delete all instances of an entity swift
- displaying button title swift stackoverflow
- swift switch
- xcode how to get aspect ratio of device
- swift set uicolor
- swift uitableview insert cell
- swift update uilabel text button
- time formats swift
- parsing to double any data type in swift
- How do I check if a string contains another string in Swift
- UIFont.init bold
- give background color swiftui
- swift add horizontal line uiview programmatically
- swift list
- swift get day from available string