Advertisement
Guest User

Untitled

a guest
May 24th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else {
  2. return
  3. }
  4. if UIApplication.shared.canOpenURL(settingsUrl) {
  5. if #available(iOS 10.0, *) {
  6. UIApplication.shared.open(settingsUrl, completionHandler: { (success) in
  7. })
  8. }
  9. else {
  10. UIApplication.shared.openURL(settingsUrl)
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement