Contents

xMagneticNorthZVertical

A reference frame where the Z axis is vertical and the X axis points to the magnetic north pole.

Declaration

static var xMagneticNorthZVertical: CMAttitudeReferenceFrame { get }

Mentioned in

Discussion

Use this option to determine the attitude of the device relative to magnetic north. For example, you might use this to implement a compass feature in your app. The yaw (Z-axis) value in CMAttitude is 0 when the X axis is aligned with magnetic north.

The device must have a magnetometer and that sensor must be available. If the magnetometer isn’t currently calibrated, Core Motion prompts the person to move the device to calibrate it.

See Also

Getting the reference frames