I have a view in UIScrollView in which the user can zoom into.

The view has the same size as the UIScrollView frame. However, the subviews of that view are bigger and centered. It's a container with same size as UIScrollView with centered content.

When zooming out, UIScrollView changes the scale of the content with an awkward anchor point to the upper left, rather than a centered one.

Is there a way to change this behavior such that when zooming in or out the zoom happens relative to the center rather than the upper left corner?