UITouch.GetAzimuthUnitVector(UIView) Method

Definition

Returns the rotation of the pointing device relative to the plane of the screen, as a unit vector.

[Foundation.Export("azimuthUnitVectorInView:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 1, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual CoreGraphics.CGVector GetAzimuthUnitVector (UIKit.UIView view);
abstract member GetAzimuthUnitVector : UIKit.UIView -> CoreGraphics.CGVector
override this.GetAzimuthUnitVector : UIKit.UIView -> CoreGraphics.CGVector

Parameters

view
UIView

The UIView whose Transform defines the relative angle from which the vector is calculated.

This parameter can be null.

Returns

If this property is not supported, the return vector is [0, 0] (Note: not [+1, 0]).

Attributes

Remarks

On supported hardware (see EstimatedProperties), this value returns a unit vector whose values define the rotation of the touching device (e.g., Apple Pencil) relative to the plane of the screen and the Transform of the view. If view is null or uses the default transform, the right-hand side of the UIView will have a unit vector with dx of 1.0 and a dy of 0.0, the top of the UIView will have dx = 0.0 and dy = -1.0 and so forth. (Note that in the default transform, Y increases towards the bottom of the view, so the top of the unit circle has a -1.0 value.)

Applies to

See also

  • <xref:UIKit.UITouch.GetAzimuthAngle>