【发布时间】:2015-10-28 23:50:03
【问题描述】:
在我的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:)])
标签: objective-c xcode ios8 cllocationmanager