【发布时间】:2012-01-17 16:42:28
【问题描述】:
我想检查用户的iphone是否可以使用区域监控,所以我用CLLocationManager中的regionMonitoringAvailable属性检查,但是xcode说有错误:
error: Semantic Issue: Property 'regionMonitoringAvailable' not found on object of type 'CLLocationManager *'
这是我的代码:
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
if (locationManager.regionMonitoringAvailable) {
NSLog(@"test");
}
有人知道为什么会这样吗?非常感谢!
【问题讨论】:
-
在应用部署到设备之前xcode中显示错误,所以我猜这与iOS设备版本无关。
标签: iphone core-location region