Misleading Behavior with MKPinAnnotationView

Originator:steven.baranski
Number:rdar://12894600 Date Originated:12/17/2012
Status:Open Resolved:
Product:iPhone SDK Product Version:6.0.1
Classification:Other Bug Reproducible:Always
 
Summary:

MKPinAnnotationView states that it is intended to display a pin with an optional drop animation. Unfortunately, however, it is still possible to (mistakenly) associate a custom image with said animation since it inherits from MKAnnotationView. Changing map types when MKPinAnnotationView is used results in the loss of said custom image.

Steps to Reproduce:

1. Extract & run the attached sample project (MapPinAnnotationViews) - a simple UITabBarController with two separate map views. The first tab employs MKAnnotationView to present a custom image on the map. The second tab attempts to apply a custom image to an MKPinAnnotationView.

2. Note that first tab behaves as expected when changing map types. That is to say, the custom image persists.

3. Switch to the second tab - note the appearance of the custom image.

4. Change map types. Note that the red pin replaces the custom image.

Expected Results:

It may be necesssary to modify the inheritance hierarchy or more clearly distinguish the intended use of MKPinAnnotationView & MKAnnotationView in the documentation.

Actual Results:

The pin image appears initially in both cases. Said image remains (as expected) for the MKAnnotationView tab, but it does not for MKPinAnnotationView. In the latter case, the custom image appears, then immediately disappears when changing map types.

Regression:

None.

Notes:

None.

Comments

Sample Project

https://github.com/stevebaranski/rdar12894600

By steven.baranski at Jan. 2, 2013, 7:15 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!