我正在使用MKReverseGeocoder
iOS < 5 和CLGeocoder
iOS >= 5,但由于MKReverseGeocoder
已弃用而收到警告,然后我尝试执行以下操作:
#define SYSTEM_LOWER_THAN_5 ([[[UIDevice currentDevice] systemVersion] compare:@"5.0" options:NSNumericSearch] == NSOrderedAscending)
#if SYSTEM_LOWER_THAN_5
@interface TelstraLocationService () <MKReverseGeocoderDelegate>
#else
@interface TelstraLocationService ()
#endif
但我得到一个错误:
预处理器表达式开头的标记无效
这是由只能在运行时评估的宏引起的。有没有办法摆脱警告(不改变部署目标)?