wantsForwardedScrollEvents(for:)
Returns whether to forward elastic scrolling gesture events up the responder.
Declaration
func wantsForwardedScrollEvents(for axis: NSEvent.GestureAxis) -> BoolParameters
- axis:
The gesture axis. See Gestureaxis for the possible values.
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 trackSwipeEvent(options:dampenAmountThresholdMin:max:usingHandler:).
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.