Anyone else seeing bad behaviour on zooming UIScrollViews in the first iOS 12 beta?
I've got a minimal app with a scrollview containing an imageview, set up using autolayout as you'd expect - imageview constrained to the scrollview, scrollview constrained to the view-controller's view. The scrollview's delegate returns the imageview from viewForZooming .
On iOS 11 it behaves as you'd expect, but on iOS 12 the imageview is offset by some amount proportional to the zoomScale, as if it had a contentInset (it doesn't)
Filed it as rdar://40799147 , but it seems like an obvious enough problem that I'm wondering if I'm doing something dumb.
Edit: More specifically, it looks like the viewForZooming's center is bad. Previously the scrollview would this scale up and down with the zoomScale, whereas on iOS 12 it is fixed to the view bounds center. Since a view's center is in the superview coordinate space (in which the view has been scaled), this seems wrong.
Edit2: Come to think of it, I don't understand how zooming scrollviews ever actually worked with autolayout. It seems like the iOS 11 behaviour actually only works by silently breaking a bunch of constraints when you zoom in or out - when you zoom, nothing changes that autolayout cares about (only transforms and frames are changed) but it still somehow comes up with a different answer for your view's center. Whereas the iOS 12 behaviour seems like autolayout behaving as-advertised.
I don't get why this change doesn't break more apps than it does...