Mapview delegate must be set earlier on iOS6

Number:rdar://12346693 Date Originated:20-09-2012
Status:Open Resolved:
Product:iOS Product Version:6
Classification:Bug Reproducible:Always

In iOS 5 and earlier, you could set your mapview delegate after annotations had been added to the map and be assured that mapView:viewForAnnotation: would be called for all annotations. 

On iOS 6, setting the delegate too late means that annotations already added to the map will get a default annotation view, and the custom mapView:viewForAnnotation will not be called.

This results in pins with callouts with (for example) no accessory views.

Steps to Reproduce:

Add annotations to the map. Set the delegate later in the code. Check that mapView:viewForAnnotation has been called.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!