Contents

magnify(toFit:)

Magnifies the content view proportionally such that the given rectangle fits centered in the scroll view.

Declaration

func magnify(toFit rect: NSRect)

Parameters

  • rect:

    The rectangle (in content view space) to which the content view is magnified.

Discussion

The resulting magnification value is clipped to the minMagnification and maxMagnification values. To animate the magnification, use the object’s animator.

See Also

Zooming the Scroll View