Contents

headingOrientation

The device orientation to use when computing heading values.

Declaration

var headingOrientation: CLDeviceOrientation { get set }

Mentioned in

Discussion

When computing heading values, the location manager assumes that the top of the device in portrait mode represents due north (0 degrees) by default. For apps that run in other orientations, this property allows you to specify which device orientation you want the location manager to use as the reference point for due north.

Setting the value of this property to CLDeviceOrientation.unknown, CLDeviceOrientation.faceUp, or CLDeviceOrientation.faceDown has no effect on the orientation reference point, and the system retains the original reference point instead.

Changing the value in this property affects only heading values reported after the change.

Topics

Heading configuration

See Also

Running the heading service