In version 7.1, which has been out for a few days, I have confirmed your sample code works correctly. So the fix is to upgrade to version 7.1!
iOS MKMapView setCenterCoordinate: after orientation changes to landscape will change zoom level
-
15-06-2023 - |
Pregunta
Using MKMapView setCenterCoordinate:
after the orientation changes to landscape will change the zoom level. Even a dummy reset to the existing value will change the zoom. This happens once after every orientation change from portrait to landscape.
Steps:
- Hook up
MKMapView
andCLLocationManager
- Call
setCenterCoordinate:
with last location - Rotate to landscape orientation, pause
- Rotate to portrait orientation, pause
- Repeat 3 and 4, map will continue to zoom out for each iteration
Or if you want to try it out directly, I have a zipped sample project included in Apple Bug Report ID 16146556 available through Dropbox.
This problem is really affecting the usability of the app, and I would welcome any recommendations or advice. It occurs in real devices and the emulator as well.
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow