Instance Method


The distance traveled by the mouse during the gesture.


- (NSPoint)translationInView:(NSView *)view;



The view in whose coordinate system the translation of the pan gesture should be computed. The view’s transform is applied to the distance values

Return Value

A point whose x and y values correspond to the total distance travelled since the beginning of the gesture.


The x and y values of the returned point report the total translation over time. They are not delta values from the last time that the translation was reported. To determine the starting point of the gesture, subtract the current translation values from the current location of the mouse in the same view.

See Also

Tracking the Location and Velocity of the Gesture

- setTranslation:inView:

Changes the current translation value of the gesture recognizer.

- velocityInView:

The velocity of the pan, measured in points per second.