MKMapView -setRegion needs to be called twice

Originator:futuretap
Number:rdar://10741453 Date Originated:23-Jan-2012 11:43 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:5.0
Classification:Other Bug Reproducible:Always
 
Summary:
There are situations where a single -setRegion:animated: call to MKMapView doesn't suffice to perform the complete region change. The region is slightly changed towards the indicated destination region but not completely. A second call with the same parameters lets the mapView "finish" the region change to the destination region.

Example:
Map region A:
center: 38.376115, -78.178711
span: 31.535612, 28.125000

Map Region B:
center: 61.185625,-149.941406
span: 32.366016,56.250000


Steps to Reproduce:
[mapView setRegion:A];
[mapView setRegion:B animated:YES];

Expected Results:
Region B should be displayed.

Actual Results:
Region C (with the correct span but an incorrect center is displayed):
center: 61.185625/-130.605469
span: 40.511116/56.250000


Regression:
Bug occurs under at least iOS 4.3 - 5.1 beta.



Please see the attached demo project that reproduces the issue: http://d.pr/G321

Press "Move Back" first, then "Move". Then you have to press "Move" again in order to move the map region to the final destination.

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!