I have an application with an explicit user interaction that makes use of the user\'s current location. If the user denies access to location services, I would still like su
Here is the swift 3 implementation of the code provided by Markus and bjc.
let alertController = UIAlertController(title: NSLocalizedString("Enter your title here", comment: ""), message: NSLocalizedString("Enter your message here.", comment: ""), preferredStyle: .alert)
let cancelAction = UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel, handler: nil)
let settingsAction = UIAlertAction(title: NSLocalizedString("Settings", comment: ""), style: .default) { (UIAlertAction) in
UIApplication.shared.openURL(NSURL(string: UIApplicationOpenSettingsURLString)! as URL)
}
alertController.addAction(cancelAction)
alertController.addAction(settingsAction)
self.present(alertController, animated: true, completion: nil)