Type Method

availableAttitudeReferenceFrames

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

Declaration

+ (CMAttitudeReferenceFrame)availableAttitudeReferenceFrames;

Return Value

A bitmask that you can bitwise-AND with the enum constants of the CMAttitudeReferenceFrame type.

Discussion

For example, to determine whether CMAttitudeReferenceFrameXMagneticNorthZVertical is available on the device, you would perform the following test:

if ([CMMotionManager availableAttitudeReferenceFrames] & CMAttitudeReferenceFrameXMagneticNorthZVertical) {
    // do something appropriate here
}

See Also

Accessing Attitude Reference Frames

attitudeReferenceFrame

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

CMAttitudeReferenceFrame

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