How to update MKMapview in iOS 6?

Could you tell me what changes need to be made to show the annotation output in iOS 6 . I developed a map-based application in iOS 5 . It shows that it works well, but after updating in iOS 5 , the map outputs do not appear in my application. How can I do this in iOS 6?

+2
source share
1 answer

I had problems with my application. In iOS 5, I created MKMapView in viewDidLoad, but I was lazy in creating a map display delegate. Sometimes I added annotations to the map view BEFORE setting the map display delegate. All this worked perfectly, PROVIDED that the delegate was configured inside viewWillAppear (or earlier).

With iOS 6, this no longer works. Before adding annotations to the map view, you must configure the delegate.

Hypothesis. In iOS 5.x, MapKit internally cached annotations and passed those annotations to the map view after a delegate was installed. In iOS 6, for some reason, this difficulty level has been eliminated. Bummer ...: - (

Hope this helps, Dave

+3
source

Source: https://habr.com/ru/post/1435199/


All Articles