我的问题是关于从#CLLocation 管理器获取多个位置以及如何在 Objective-C 中制作 x 和 y 轴。
最佳答案
所有位置存储在委托(delegate)方法中:
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
上述委托(delegate)在 iOS 6 中已弃用。现在应使用以下委托(delegate):
- (void)locationManager:(CLLocationManager *)manager
didUpdateLocations:(NSArray *)locations
为了获得最后的位置,只需获取数组的最后一个对象:
[locations lastObject]
关于objective-c - 来自 ios 中位置服务的多个位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32907037/