attitudeReferenceFrame
Returns either the reference frame currently being used or the default attitude reference frame.
Declaration
var attitudeReferenceFrame: CMAttitudeReferenceFrame { get }Mentioned in
Discussion
If the device-motion service is active, this property returns the reference frame currently in use. If the service is inactive, but your app started it at some point since launch, this property contains the last reference frame you used. If you haven’t started the device-motion service since app launch, this property returns the default frame of reference, which is xArbitraryZVertical.
If device motion is not available on the current device, the value of this property is undefined.