iOS 8 Map Kit Obj-C Cannot Get Users Location

前端 未结 8 690
[愿得一人]
[愿得一人] 2020-11-27 11:45

I am working with Map Kit in iOS 8 using Obj-C NOT SWIFT. I cannot get the device location it is set a 0.00, 0.00 and I am getting the error:

Trying to start         


        
8条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 12:00

    Try This One:

     (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status {
    
        if (status == kCLAuthorizationStatusAuthorizedWhenInUse) {
            self.mapView.showsUserLocation = YES;
        }
    

提交回复
热议问题