Overridden by subclasses to modify a given rectangle, returning the altered rectangle.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
Parameters
proposedVisibleRect
A rectangle defining a region of the view.
Discussion
NSClip
invokes this method to allow its document view to adjust its position during scrolling. For example, a custom view object that displays a table of data can adjust the origin of proposed
so rows or columns aren’t cut off by the edge of the enclosing NSClip
. NSView
’s implementation simply returns proposed
.
NSClip
only invokes this method during automatic or user controlled scrolling. Its scroll(to:)
method doesn’t invoke this method, so you can still force a scroll to an arbitrary point.