---
title: endGeneratingDeviceOrientationNotifications()
framework: uikit
role: symbol
role_heading: Instance Method
path: uikit/uidevice/endgeneratingdeviceorientationnotifications()
---

# endGeneratingDeviceOrientationNotifications()

Ends the generation of notifications of device orientation changes.

## Declaration

```swift
func endGeneratingDeviceOrientationNotifications()
```

## Discussion

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

## See Also

### Tracking the device orientation

- [orientation](uikit/uidevice/orientation.md)
- [UIDeviceOrientation](uikit/uideviceorientation.md)
- [isGeneratingDeviceOrientationNotifications](uikit/uidevice/isgeneratingdeviceorientationnotifications.md)
- [beginGeneratingDeviceOrientationNotifications()](uikit/uidevice/begingeneratingdeviceorientationnotifications().md)
