Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

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)
}
Comment

PREVIOUS NEXT
Code Example
Swift :: on swipe get contentoffset swift collectionview 
Swift :: settimeout in swift 
Swift :: swiftui random color 
Swift :: add shadow to uibutton swift 
Swift :: navigationview hide header swiftui 
Swift :: declaring vs initializing variables 
Swift :: get length of array swift 
Swift :: swift view float on keyboard show 
Swift :: add buton border swift 
Swift :: swift open settings page 
Swift :: swift convert string to ns muteable string 
Swift :: swift http request 
Swift :: swift temporary directory 
Swift :: round up swift 
Swift :: Fetch structure from userdefaults ios swift 
Swift :: swift remove all duplicates from an array 
Swift :: swift for loop 
Swift :: IOS create UIAlertViewController programmatically 
Swift :: string to double swift 
Swift :: swift print 
Swift :: Delete Realm database swift 
Swift :: change individual element alignment swiftui 
Swift :: Swift Closure That Returns Value 
Swift :: swift remove value dictionary 
Swift :: how to Not bool bindng swiftui 
Swift :: === in swift 
Swift :: How to remove the last item from an array in swift 
Swift :: Swiftui run action before navigationlink inside on button 
Swift :: Type Constraints Swift 
Swift :: table flutter stackoverflow 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =