在我的viewDidLoad
方法中,我有以下代码
locationManager = [[CLLocationManager alloc]init]; // initializing locationManager
locationManager.delegate = self; // we set the delegate of locationManager to self.
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
if([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
[locationManager requestWhenInUseAuthorization];
}
请求已经发出,但用户没有收到提示?为什么?
if([locationManager respondsToSelector:@selector(requestWhenInUseAuthorization:)])
。 - Jai Govindani