Instance Method

wantsForwardedScrollEventsForAxis:

Returns whether to forward elastic scrolling gesture events up the responder.

Declaration

- (BOOL)wantsForwardedScrollEventsForAxis:(NSEventGestureAxis)axis;

Parameters

axis

The gesture axis. See NSEventGestureAxis for the possible values.

Return Value

Returns YES 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; NO 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 trackSwipeEventWithOptions:dampenAmountThresholdMin:max:usingHandler:.

Implement this method and return YES 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.

See Also

Touch and Gesture Events

- beginGestureWithEvent:

Informs the receiver that the user has begun a touch gesture.

- endGestureWithEvent:

Informs the receiver that the user has ended a touch gesture.

- magnifyWithEvent:

Informs the receiver that the user has begun a pinch gesture.

- rotateWithEvent:

Informs the receiver that the user has begun a rotation gesture.

- swipeWithEvent:

Informs the receiver that the user has begun a swipe gesture.

- touchesBeganWithEvent:

Informs the receiver that new set of touches has been recognized.

- touchesMovedWithEvent:

Informs the receiver that one or more touches has moved.

- touchesCancelledWithEvent:

Informs the receiver that tracking of touches has been cancelled for any reason.

- touchesEndedWithEvent:

Returns that a set of touches have been removed.

- smartMagnifyWithEvent:

Informs the receiver that the user performed a smart zoom gesture.

- wantsScrollEventsForSwipeTrackingOnAxis:

Implement this method to track gesture scroll events such as a swipe.

NSEventGestureAxis

The gesture tracking axis.