MKAnnotationView no longer respects contentMode
| Originator: | harlanhaskins | ||
| Number: | rdar://34191084 | Date Originated: | August 31 2017 |
| Status: | Open | Resolved: | |
| Product: | MapKit | Product Version: | iOS 11 |
| Classification: | Serious Bug | Reproducible: | Always |
In the iOS 11 beta, MKAnnotationView seems to have gained a new backing layer, _MKAnnotationViewLayer, that does not respect the content mode of the view. Playing around with Reveal, on iOS 10.3 MKAnnotationView is backed by a CALayer, and changing the contentMode on the MKAnnotationView affects the drawing. On iOS 11, though, MKAnnotationView is backed with a _MKAnnotationViewLayer, which seems to draw the view as .scaleToFill always, no matter how I change the contentMode on my MKAnnotationView subclass. I've attached a project that cycles through some content modes on an MKAnnotationView. Running this code on iOS 10 shows the view change drastically, while running it on iOS 11 doesn't show any view change at all. Additionally, the content mode defaults to scaleAspectFit on iOS 10, while it performs scaleToFill behavior on iOS 11.
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!