Questions tagged «cllocation»

19
didFailWithError:错误域= kCLErrorDomain代码= 0“无法完成该操作。(kCLErrorDomain错误0。)”
我想获取当前位置,但出现错误。 这是我的视图控制器的片段。 - (void)viewDidLoad { self.locationManager = [[CLLocationManager alloc] init]; [locationManager setDelegate:self]; [locationManager setDesiredAccuracy:kCLLocationAccuracyNearestTenMeters]; [locationManager startUpdatingLocation]; } - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations { // I would get the latest location here // but this method never gets called } - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { NSLog(@"didFailWithError: %@", error); } …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.