我正在开发GPS应用程序。
你知道如何检测移动设备的速度吗?
实际上,我需要每2秒检测一次速度。
我知道当位置改变时会调用didUpdateToLocation
方法。
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
但我认为这种方法不适合我的问题。
那么,我需要在2秒内检查[CLLocationManager location]
的速度吗?
有什么建议吗?
提前感谢。