1
我要檢查,如果用戶的iPhone可以使用區域的監測,所以我在CLLocationManager regionMonitoringAvailable物業檢查,但Xcode中說,有一個錯誤:語義問題:房產「regionMonitoringAvailable」未找到
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設備版本無關。 – 2012-01-17 16:54:08