ios 中定位服务的多个位置?

Multiple locations from location services in ios?

我的问题是关于从#CLLocation 管理器获取多个位置以及如何在 objective C 中制作 x 轴和 y 轴。

存储在委托方法中的所有位置:

- (void)locationManager:(CLLocationManager *)manager 
    didUpdateToLocation:(CLLocation *)newLocation 
           fromLocation:(CLLocation *)oldLocation

上面的委托在 iOS6 中被弃用。现在应该使用以下内容:

- (void)locationManager:(CLLocationManager *)manager 
     didUpdateLocations:(NSArray *)locations

为了得到最后的位置,只需得到数组的最后一个对象:

[locations lastObject]