Skip to content

Instantly share code, notes, and snippets.

@hashmaparraylist
Created May 16, 2015 14:07
Show Gist options
  • Save hashmaparraylist/8b239a75b1cd387f2cb5 to your computer and use it in GitHub Desktop.
Save hashmaparraylist/8b239a75b1cd387f2cb5 to your computer and use it in GitHub Desktop.
iOS 7.0 Location Service授权方法
CLAuthorizationStatus authStatus = [CLLocationManager authorizationStatus];
if (authStatus == kCLAuthorizationStatusNotDetermined) {
// _locationManager is CLLocationManager
[_locationManager requestWhenInUseAuthorization];
return;
} else if (authStatus == kCLAuthorizationStatusDenied || authStatus == kCLAuthorizationStatusRestricted) {
// show location services denied alert
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment