Xcode 6.3.2: MKAnnotationView’s “centerOffset” property documentation

Originator:SlaunchaMan
Number:rdar://21610850 Date Originated:30-Jun-2015 10:28 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.3.2 (6D2105)
Classification:Other Bug Reproducible:Always
 
Summary:
According to the documentation for MKAnnotationView, the “centerOffset” is in pixels. In practice, it’s in points.

Steps to Reproduce:
1. Create an MKMapView and add several annotations to it.
2. In the delegate callback, create an MKAnnotationView for each annotation with an image.
3. Set the center offset to {0, -(imageHeightInPixels / 2)} to place the annotation view’s bottom center at the annotation’s location on the map.
4. Zoom the map in and out.

Expected Results:
The annotation views will remain anchored to their locations.

Actual Results:
Because the image height was specified in pixels, not points, on Retina displays the annotations will move around unexpectedly.

Comments


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!