Copies the visible portion of the view’s rendered image within a region and lays that portion down again at a specified offset .
- macOS 10.0–10.14Deprecated
A rectangle defining a region of the view.
NSSize structure that specifies an offset from from
This method is useful during scrolling or translation of the coordinate system to efficiently move as much of the view’s rendered image as possible without requiring it to be redrawn, following these steps:
scroll(_:by:) to copy the rendered image.
Move the view object’s origin or scroll it within its superview.
Calculate the newly exposed rectangles and either set the
needsDisplay property to
true or call
setNeedsDisplay(_:) to draw them.
You should rarely need to use this method, however. The
autoscroll(with:) methods automatically perform optimized scrolling.
Scrolls the view’s closest ancestor
NSClipView object so a point in the view lies at the origin of the clip view's bounds rectangle.
Notifies a clip view’s superview that either the clip view’s bounds rectangle or the document view’s frame rectangle has changed, and that any indicators of the scroll position need to be adjusted.