Instance Method

magnifyToFitRect:

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

Declaration

- (void)magnifyToFitRect:(NSRect)rect;

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

allowsMagnification

Allows the user to magnify the scroll view.

magnification

The amount by which the content is currently scaled.

maxMagnification

The maximum value to which the content can be magnified.

minMagnification

The minimum value to which the content can be magnified.

- setMagnification:centeredAtPoint:

Magnify the content by the given amount and center the result on the given point.