I've a MKMapView that I expand and contract with code like this:
UIView.animate(withDuration: 0.5) {
mapView.frame = CGRect(x: 0, y: 0, width: 200, height: 400)
}
Before IOS 11 the above code would trigger regionDidChangeAnimated
delegate method after animation was completed. It would change its region and let zoom level be.
In IOS 11 just the zoom changes. None of the delegate methods are triggered.
I need to have it like before. Changing maps frame should just make the visible area bigger without zoom change.
I've tried to set mapView.isZoomEnabled = false
before altering mapViews frame, but the zoom level keeps changing.
Update:
I added two animated GIFs to compare IOS 11 with previous IOS versions.
IOS 11 will zoom in immediately before expand animation starts. It will zoom out after the reverse animation is completed.
As you see below the IOS 9 animation is smooth as silk.
IOS 11:
IOS 9: