我正在使用CoreLocation,我想调用一种方法,在经过分配有效值或更新这些值之后,对纬度和经度进行一些计算。
你是如何实现的?我正在考虑使用performSelector,但这些方法需要一段时间延迟 - 我不想要时间延迟,我想知道纬度和经度首先有有效值。
答案 0 :(得分:2)
为什么不在Core Locations委托方法中调用您想要的任何方法:
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation;
经验法则是忽略第一组CLLocation坐标。