【发布时间】:2012-07-23 09:30:05
【问题描述】:
我有以下简单代码,用于查看设备是否支持重要的位置变化监控:
if (![CLLocationManager significantLocationChangeMonitoringAvailable])
{UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Sorry" message:@"Your device won't support the significant location change." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
return;
}
这在 iOS 5 设备上总是返回 yes,但在 iOS 4.3 设备上返回 NO。这些设备中有 3G。
根据documentation,从 4.0 开始支持此 API。
【问题讨论】:
标签: ios4 location monitoring cllocationmanager