Returns whether to forward elastic scrolling gesture events up the responder.
SDK
- macOS 10.7+
Framework
- App
Kit
Declaration
func wantsForwardedScrollEvents(for axis: NSEvent.Gesture Axis) -> Bool
Parameters
axis
The gesture axis. See
NSEvent
for the possible values..Gesture Axis
Return Value
Returns true
when forward gesture scroll events should be forwarded up the responder chain when the scrolling content is already at the edge of the scrolled direction at the beginning of the scroll gesture; false
otherwise.
Discussion
Some views process gesture scroll events to perform elastic scrolling. In some cases, you may want to track gesture scroll events like a swipe, see track
.
Implement this method and return true
in your swipe controller and views that perform elastic scrolling will forward gesture scroll events up the responder chain on the following condition: the content to be scrolled is already at the edge of the scrolled direction at the beginning of the scroll gesture.
Otherwise, the view will perform elastic scrolling.