【发布时间】:2023-03-10 20:24:02
【问题描述】:
我正在开发 GPS 应用程序。 你知道如何检测移动设备的速度吗?
实际上,我需要每 2 秒检测一次速度。
我知道 didUpdateToLocation 方法是在位置更改时调用的。
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
但我认为这种方法不适合我的问题。
那么,我需要在 2 秒内检查 [CLLocationManager location] 的速度吗?
有什么建议吗?
提前致谢。
【问题讨论】:
标签: iphone objective-c ios performance cllocation