Instance Property

attitudeReferenceFrame

Returns either the reference frame currently being used or the default attitude reference frame.

Declaration

var attitudeReferenceFrame: CMAttitudeReferenceFrame { get }

Discussion

If device motion is active, this property returns the reference frame currently in use. If device motion is not active but has been active since the app was last launched, this property returns the last frame used. If device motion has not been active since the app was last launched, this property returns the default attitude reference frame for the device. If device motion is not available on the device, the value is undefined.

See Also

Accessing Attitude Reference Frames

class func availableAttitudeReferenceFrames() -> CMAttitudeReferenceFrame

Returns a bitmask specifying the available attitude reference frames on the device.

struct CMAttitudeReferenceFrame

Enum constants for indicating the reference frames from which all attitude samples are referenced.