Instance Method

wantsScrollEventsForSwipeTrackingOnAxis:

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

Declaration

- (BOOL)wantsScrollEventsForSwipeTrackingOnAxis:(NSEventGestureAxis)axis;

Parameters

axis

The event gesture axis of the swipe, which defines the scroll direction.

Return Value

YES if gesture scroll events are to be forwarded up the responder chain; otherwise NO. The default implementation returns NO.

Discussion

Implement this method in your swipe controller and return YES 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 NO.

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.

- wantsForwardedScrollEventsForAxis:

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

- smartMagnifyWithEvent:

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

NSEventGestureAxis

The gesture tracking axis.