Can't get Location in iOS (GEOErrorDomain Code=-204)

前端 未结 3 1340
醉梦人生
醉梦人生 2021-01-05 15:30

I am trying to display a map and drop a pin using MKMapView. This is my code

MKCoordinateRegion region = { {0.0, 0.0 }, { 0.0, 0.0 } }; 
region.         


        
3条回答
  •  遥遥无期
    2021-01-05 15:58

    I had the same issue, in my case it only happen when closing the UIViewController before the map completed loading all tiles. The fix was to set the mapView (MKMapView) delegate to nil when closing the view controller.

    mapView.delegate = nil;
    

提交回复
热议问题