locationManager 回调方法不调用问题?

当locationManager都设置好了后开始定位服务后回调方法didUpdateToLocation不调用

[_locationManager setDelegate:self];

 [_locationManager startUpdatingLocation];


结果花了几个小时发现我是在非主线程里调用定位,在main thread里调用就ok了

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation


你可能感兴趣的:(locationManager 回调方法不调用问题?)