Instance Method

endGeneratingDeviceOrientationNotifications()

Ends the generation of notifications of device orientation changes.

Declaration

func endGeneratingDeviceOrientationNotifications()

Discussion

This method stops the posting of UIDeviceOrientationDidChange notifications and notifies the system that it can power down the accelerometer hardware if it is not in use elsewhere. You call this method after a previous call to the beginGeneratingDeviceOrientationNotifications() method.

See Also

Getting the Device Orientation

var orientation: UIDeviceOrientation

Returns the physical orientation of the device.

var isGeneratingDeviceOrientationNotifications: Bool

A Boolean value that indicates whether the receiver generates orientation notifications (true) or not (false).

func beginGeneratingDeviceOrientationNotifications()

Begins the generation of notifications of device orientation changes.