我的问题是在ios 8中没有得到当前位置的纬度和经度.我试图在ios 8的.plist文件中设置密钥,但是没有调用这个方法 - didUpdateToLocation:请帮助解决这个问题.
我的代码是: -
- (void)viewDidLoad
Run Code Online (Sandbox Code Playgroud)
{
[super viewDidLoad];
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
if(IS_OS_8_OR_LATER) {
//[self.locationManager requestWhenInUseAuthorization];
[self.locationManager requestWhenInUseAuthorization];
[self.locationManager startUpdatingLocation];
}
Run Code Online (Sandbox Code Playgroud)
}