【发布时间】:2013-12-04 12:14:55
【问题描述】:
过去两天我一直在尝试在应用中实现延迟位置更新。 我面临的问题是
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
即使在我调用
之后,每秒都会调用该方法 [self.locMgr allowDeferredLocationUpdatesUntilTraveled:(CLLocationDistance)200 timeout:(NSTimeInterval)25];
方法。
虽然我不得不说
- (void)locationManager:(CLLocationManager *)manager didFinishDeferredUpdatesWithError:(NSError *)error
在我指定的 allowDeferredLocationUpdatesUntilTraveled 方法指定的 25 秒后准确调用,错误代码 = null。
我从文档中了解到,didUpdateLocations 应该仅在 25 秒后调用。 任何帮助将不胜感激。
【问题讨论】:
-
我检查了几乎所有关于 ios 延迟的论坛,发现了这一点。它几乎与我面临的问题相同。 devforums.apple.com/message/903992#903992
-
我不认为我会得到正确的答案。以下链接似乎有帮助,devforums.apple.com/message/766429#766429 发布它,因为它可能对其他人有帮助。