Instance Method

azimuthUnitVectorInView:

Returns a unit vector that points in the direction of the azimuth of the stylus.

Declaration

- (CGVector)azimuthUnitVectorInView:(UIView *)view;

Parameters

view

The view that contains the stylus’s touch. Pass nil to get the unit vector for the azimuth that is relative to the touch’s window.

Return Value

The unit vector that points in the direction of the azimuth of the stylus.

Discussion

It is less expensive to get the azimuth unit vector than the azimuth angle. If you’re creating transform matrices, the unit vector can also be more useful.

See Also

Getting Touch Attributes

tapCount

The number of times the finger was tapped for this given touch.

timestamp

The time when the touch occurred or when it was last mutated.

type

The type of the touch.

UITouchType

The type of touch received.

phase

The phase of the touch.

UITouchPhase

The phase of a finger touch.

force

The force of the touch, where a value of 1.0 represents the force of an average touch (predetermined by the system, not user-specific).

maximumPossibleForce

The maximum possible force for a touch.

altitudeAngle

The altitude (in radians) of the stylus.

- azimuthAngleInView:

Returns the azimuth angle (in radians) of the stylus.