我使用的核心位置,我的发展目标如下5.0是我的代码开始更新什么是弃用?如何在所有版本中处理它?
self.locationManager = [[CLLocationManager alloc]init];
[self.locationManager setDelegate:self];
[self.locationManager startUpdatingLocation];
下面是委托方法
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
// Do Something Here
}
它叫的iOS 5.0和6.0,但在iOS中得到了弃用7.0起 所以适用于iOS 7.0及以上我不得不使用下面
- (void)locationManager:(CLLocationManager *)manager
didUpdateLocations:(NSArray *)locations
{
// Do Something Here
}
我的问题是,我将不得不管理两个SE parate委派方法7.0以下和7.0以上的iOS?
如果不是,请详细解释一下。
如何处理不推荐的属性? – 2014-10-30 07:12:36
检查这篇文章 - http://stackoverflow.com/questions/12562152/replacement-for-purpose-property-of-cllocationmanager – 2014-10-30 07:27:12