if ([CLLocationManager locationServicesEnabled] && ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined)) { //定位功能可用 CLLocationManager *locationManger = [[CLLocationManager alloc] init]; locationManger.delegate = self; [locationManger startUpdatingLocation]; } else if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied){ NSlog("定位功能不可用"); }