Contents

adjustScroll(_:)

Overridden by subclasses to modify a given rectangle, returning the altered rectangle.

Declaration

func adjustScroll(_ newVisible: NSRect) -> NSRect

Parameters

  • newVisible:

    A rectangle that defines a region of the view.

Discussion

NSClipView 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 newVisible so rows or columns aren’t cut off by the edge of the enclosing NSClipView. The NSView implementation simply returns newVisible.

NSClipView 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.

See Also

Scrolling the View