Guest User

Untitled

a guest
May 20th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. extension UIApplication {
  2. class func tryURL(urls: [String]) {
  3. let application = UIApplication.shared
  4. for url in urls {
  5. guard let url = URL(string: url) else {
  6. continue
  7. }
  8. if application.canOpenURL(url) {
  9. application.open(url, options: [:], completionHandler: nil)
  10. return
  11. }
  12. }
  13. }
  14. }
Add Comment
Please, Sign In to add comment