【发布时间】:2012-12-14 09:51:57
【问题描述】:
为了确定用户的位置,我使用了 CoreLocation 框架(我目前正在开发一个 OSX 应用程序(位置由 wifi 确定),但我的问题也可能适用于 iOS 应用程序)和以下委托方法:
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
当由于某种原因无法找到用户位置时(例如,如果用户的计算机没有连接到互联网),则调用以下方法:
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
在这种情况下,我想获取最后一个已知的用户位置。我想知道是否有办法获得这个最后一个已知位置。某处是否有一系列先前确定的位置?
【问题讨论】:
标签: ios macos geolocation location