Instance Method
zoom(to:animated:)
Zooms to a specific area of the content so that it is visible in the receiver.
SDKs
- iOS 3.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
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.
See Also
Zooming and Panning
var zoomScale: CGFloat
A floating-point value that specifies the current scale factor applied to the scroll view's content.
var isZoomBouncing: Bool
A Boolean value that indicates that zooming has exceeded the scaling limits specified for the receiver.
var isZooming: Bool
A Boolean value that indicates whether the content view is currently zooming in or out.
var bouncesZoom: Bool
A Boolean value that determines whether the scroll view animates the content scaling when the scaling exceeds the maximum or minimum limits.