If
you are using Location Manager to get user's current location then
you have ask Location Permission first. iOS provides you access to
user's location if user accepts it. Here is the code :-
Below
code will return you location manager object.
-(CLLocationManager*)
getLocation{ CLLocationManager *locationManager =
[[CLLocationManager alloc] init]; locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
locationManager.distanceFilter = kCLDistanceFilterNone;
[locationManager startUpdatingLocation]; if ([locationManager
respondsToSelector:@selector(requestWhenInUseAuthorization)]) {
Here is not the end. To
view the full code about Custom
message for Location Permission Alert visit the link mentioned.
No comments:
Post a Comment