zoom(to:animated:)
Zooms to a specific area of the content so that it’s visible in the scroll view.
Declaration
func zoom(to rect: CGRect, animated: Bool)Parameters
- rect:
A rectangle defining an area of the content view. The rectangle should be in the coordinate space of the view returned by Viewforzooming(in:).
- animated:
True if the scrolling should be animated, False if it should be immediate.
Discussion
This method zooms so that the content view becomes the area defined by rect, adjusting the zoomScale as necessary.