I'd like to implement a custom "page scroll" behaviour for NSScrollView, i.e., what should happen when the scroll "rail" is clicked outside the scroll knob.
How do I detect that this event happened? I already have an NSScrollView subclass, and I would rather not subclass NSScroller.
I can override the -scrollClipView:ToPoint: method and determine if the scroll point is "far away" from the current scrollpoint, but this doesn't seem reliable.
NSScrolleruses the target-action mechanism to tell theNSScrollViewto scroll. The "page scroll" action can be intercepted by replacing the target and action of the scroller. ThehitPartproperty of the scroller indicates how to scroll. Example in a subclass ofNSScrollView: