Я хочу проверить, может ли iphone пользователя использовать мониторинг региона, поэтому я проверяю его с помощью свойства regionMonitoringAvailable в CLLocationManager, однако 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");
}
Кто-нибудь знает, почему это произошло? Большое спасибо!