I am creating a location based app, and when the user has denied location access an alert view pops up asking the user go to the settings page and update the settings to allow location access. If the user allows access and then presses back the view does not refresh with the updated settings allowing the update of location.
Is there a function that can be run after the user comes back into the app from the settings page that will refresh and start updating location.
I appreciate any advice or help. Thank you.
AFTER USER CLICKS BACK TO APP, PAGE NEEDS TO REFRESH TO UPDATE LOCATION ON MAP:

func alertForNoLocationAccess(){
let alert = UIAlertController(title: "Allow Location Access", message: "Cannot add location data and map coordinates to your entries without access. Press settings to update or cancel to deny access.", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Settings", style: .default, handler: { action in
if let url = URL(string:UIApplication.openSettingsURLString) {
if UIApplication.shared.canOpenURL(url) {
if #available(iOS 10.0, *) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
UIApplication.shared.openURL(url)
}
}
}
}))
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
self.present(alert, animated: true)
}
