标签:des style blog http color io os 使用 ar
if([CLLocationManager locationServicesEnabled]){ self.locationManage = [[[CLLocationManager alloc] init] autorelease]; self.locationManage.delegate = self; self.locationManage.distanceFilter = 200; self.locationManage.desiredAccuracy = kCLLocationAccuracyBestForNavigation;//kCLLocationAccuracyBest; if (SYSTEM_VERSION >= 8.0) { //使用期间 [self.locationManage requestWhenInUseAuthorization]; //始终 //or [self.locationManage requestAlwaysAuthorization] } }
- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status { switch (status) { case kCLAuthorizationStatusNotDetermined: if ([self.locationManage respondsToSelector:@selector(requestAlwaysAuthorization)]) { [self.locationManage requestWhenInUseAuthorization]; } break; default: break; } }
标签:des style blog http color io os 使用 ar
原文地址:http://blog.csdn.net/nextstudio/article/details/40050095