Created
May 16, 2015 14:07
-
-
Save hashmaparraylist/8b239a75b1cd387f2cb5 to your computer and use it in GitHub Desktop.
iOS 7.0 Location Service授权方法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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