autoscroll(with:)
Scrolls the clip view proportionally to theEvent’s distance outside of it.
Declaration
func autoscroll(with event: NSEvent) -> BoolDiscussion
theEvent‘s location should be expressed in the window’s base coordinate system (which it normally is), not the receiving NSClipView. Returns true if any scrolling is performed; otherwise returns false.
Never invoke this method directly; instead, the NSScrollView’s document view should repeatedly send itself autoscroll(with:) messages when the pointer is dragged outside the NSScrollView‘s frame during a modal event loop initiated by a mouse-down event. The NSView class implements autoscroll(with:) to forward the message to the receiver’s superview; thus the message is ultimately forwarded to the NSClipView.