Implement this method to track gesture scroll events such as a swipe.
SDK
- macOS 10.7+
Framework
- App
Kit
Declaration
func wantsScrollEventsForSwipeTracking(on axis: NSEvent.Gesture Axis) -> Bool
Parameters
axis
The event gesture axis of the swipe, which defines the scroll direction.
Return Value
true
if gesture scroll events are to be forwarded up the responder chain; otherwise false
. The default implementation returns false
.
Discussion
Implement this method in your swipe controller and return true
to inform views that perform elastic scrolling to forward gesture scroll events up the responder chain. The events are forwarded only on the following condition: the content to be scrolled is already at the edge of the scrolled direction when the scroll gesture begins. Otherwise, the view performs elastic scrolling. The default implementation returns false
.