Instance Method

setTranslation:inView:

Changes the current translation value of the gesture recognizer.

Declaration

- (void)setTranslation:(NSPoint)translation inView:(NSView *)view;

Parameters

translation

The new translation values to use in the gesture recognizer.

view

The view in whose coordinate system you specified the new translation value. Specifying nil resets the previous translation value.

Discussion

This method changes the current translation value of the gesture recognizer. Changing the value resets the velocity of the pan. You might call this method at mouse-down time to adjust the translation value and make it relative to some specific point in your view.

See Also

Tracking the Location and Velocity of the Gesture

- translationInView:

The distance traveled by the mouse during the gesture.

- velocityInView:

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