for custom message
for the message you can use the purpose property as Alex Terente said, but it has been deprecated in iOS 6
to get the option
for knowing if the user denied the permission the location Manager provides a failure delegate. the mapview uses its own location manager so: use the MKMapView
function didFailToLocateUserWithError
- (void)mapView:(MKMapView *)mapView didFailToLocateUserWithError:(NSError *)error {
switch([error code]) {
case kCLErrorDenied:{
//user denied
}
break;
}
}
note: if you are using a CLLocationManager directly it'd be - (void)locationManager: (CLLocationManager *)manager didFailWithError: (NSError *)error;