I have an MKMapView in my app and have a button that turns on showsUserLocation for the map, while the map is finding the location I display a spinner so the user knows its working. I know when to stop the spinner by adding NSKeyValueObserver to the map’s userLocation property. However if the user has Location Services disabled then the spinner just keeps on going forever but nothing happens, is there any way to know when location services are disabled while using an MKMapView?
Share
Use locationServicesEnabled, a boolean property of a CLLocationManager.
The MapKit support for automatically showing the user’s location is pretty poor. The app I’m writing shows the user’s location, but I use CLLocationManager directly and add my own annotation to the map.