我在代码
if (gDelegate && [gDelegate respondsToSelector:@selector(locationManager:didUpdateToLocation:fromLocation:)])
中判断,gDelegate代理响应locationManager:didUpdateToLocation:fromLocation:方法,
于是后面直接调用方法
[gDelegate locationManager:gLocationManager didUpdateToLocation:newLocation fromLocation:oldLocation];
但是在编译时报错
'locationManager:didUpdateToLocation:fromLocation:' is deprecated: first deprecated in iOS 6.0 [-Werror,-Wdeprecated-declarations]
[gDelegate locationManager:gLocationManager didUpdateToLocation:newLocation fromLocation:oldLocation];
不是很清楚解决问题的思路。