【发布时间】:2015-03-02 11:27:14
【问题描述】:
我是定位服务的新手。我使用了startMonitoringSignificantLocationChanges 和(void)locationManager:(CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation 方法,但是当我更改位置值时它没有被调用。每当用户更改其位置时,我都想获取位置值。我应该如何实现这一点?请帮我解决。提前致谢。
【问题讨论】:
-
你分配了 CLLocationManagerDelegate 了吗?
-
@DheerajSingh 是的,我使用过 myLocationManager.delegate = self;并分配委托给它。
-
你用的是ios8吗?你能显示你的代码吗
-
@DheerajSingh 没有 ios 7,我知道对于 ios 8 我们需要使用“requestWhenInUseAuthorization”,我已经做到了。
标签: ios core-location cllocation