Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extension UIApplication {
- class func tryURL(urls: [String]) {
- let application = UIApplication.shared
- for url in urls {
- guard let url = URL(string: url) else {
- continue
- }
- if application.canOpenURL(url) {
- application.open(url, options: [:], completionHandler: nil)
- return
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment