0

My map view should work in 2 modes: with enabled Location Services and with disabled. If user disables locations services, application must give him the opportunity to manually set his current location. Also application should display blue pin that looks like MKUserLocation default pin. But the problem is userLocation property is readonly. And according to apple's documentation about MKUserLocation

You do not create instances of this class directly.

Can someone help me to solve this?

4

1 回答 1

0

You should provide your own blue pin. System blue pin is considered to be used as read only and if you'll try to use it in some other way that will certainly lead to problems. So if you need some custom current location pin behavior you should implement your own pin for sure. Use CLLocationManager to update location if location services are enabled.

于 2013-04-11T14:10:45.887 回答