Sandeep
Sandeep

Reputation: 61

capture event after user comes back to view controller from location settings

Trying to build a simple app where user will be prompted to allow location access. If user does not allow I am providing a button to go into settings and provide access.

Lets say if user gives the app permission to use location when in use and click on the default "Back to <>" button on the tap. In this case how do I capture the event and perform some action.

Trying this sample in swift

Upvotes: 1

Views: 393

Answers (1)

AlexZd
AlexZd

Reputation: 2152

There is method in CLLocationManagerDelegate Protocol.

optional func locationManager(_ manager: CLLocationManager!, didChangeAuthorizationStatus status: CLAuthorizationStatus)

This method is called whenever the application’s ability to use location services changes. Changes can occur because the user allowed or denied the use of location services for your application or for the system as a whole.

More Details

Upvotes: 2

Related Questions