MKMapView: Need egdePadding property
| Originator: | futuretap | ||
| Number: | rdar://11945771 | Date Originated: | 24-Jul-2012 06:26 PM |
| Status: | Open | Resolved: | |
| Product: | iPhone SDK | Product Version: | 6.0 beta 3 |
| Classification: | Feature (New) | Reproducible: | Always |
Check the PhotosByLocation sample app for reference: http://developer.apple.com/library/ios/#samplecode/PhotosByLocation/Introduction/Intro.html This app uses a transparent navigation bar on top of the mapView. Now, when selecting pin annotations, it would be desirable to move the map if the callout would be covered by the navigation bar. If the callout would be off the regular bounds of the mapView, the map correctly moves prior to showing the callout. But partly covered areas such as for a transparent navigation bar or tool bar are not considered for map movement. I'm aware of the – setVisibleMapRect:edgePadding:animated: method. However, this doesn't cut it. It only works for programmatically setting the map region once, not for scrollable maps where the user taps a pin anywhere on the map. Current map region after tapping the pin: http://d.pr/i/lP0L Desired map region: http://d.pr/i/tQpx I believe a writable property on MKMapView would be the appropriate API to cover such cases: @property (nonatomic, assign) UIEdgeInsets egdePadding; The behavior would be as follows: - when tapping an annotationView, the screen region for the callout is calculated - if this screen region is outside the bounds of the mapView minus the edgePadding, the mapView is scrolled first - then the selection is done and the callout pops up
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!