UITouch.GetAzimuthAngle(UIView) UITouch.GetAzimuthAngle(UIView) Method

Definition

Returns the rotation of the stylus relative to the plane of the screen, in radians.

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

Parameters

view
UIView UIView

The UIView whose Transform defines the relative angle to be returned.

This parameter can be null.

Returns

The default value is 0. The value returned is in the range [-π, +π]

Remarks

On supported hardware (see EstimatedProperties), this value returns the rotation, in radians, 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, 0 radians corresponds to the right-hand side of the UIView, π radians correspond to the bottom of the UIView and so forth. (Note that in the default transform, Y increases towards the bottom of the view, so radians increase clockwise.)

This method is slightly more expensive than GetAzimuthUnitVector(UIView).

Applies to