When we use location services in an application, we receive an iOS alert saying the application is trying to use the current location -- Allow/Don\'t Allow.
Do we h
You can simply get the action selected like below:
- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status {
if (status == kCLAuthorizationStatusAuthorizedAlways || status == kCLAuthorizationStatusAuthorizedWhenInUse) {
[self addRegion];
}
else if (status == kCLAuthorizationStatusDenied) {
NSLog(@"Location access denied");
}
}
make sure to set the delegate of location manager.