---
title: AVCaptureDevice.RotationCoordinator
framework: avfoundation
role: symbol
role_heading: Class
path: avfoundation/avcapturedevice/rotationcoordinator
---

# AVCaptureDevice.RotationCoordinator

A class that monitors the physical orientation of a capture device and provides adjustment angles to keep images level, relative to gravity.

## Declaration

```swift
class RotationCoordinator
```

## Overview

Overview Correctly rotate the photos and movies your app captures, and optionally, a live camera preview, by applying a coordinator’s videoRotationAngleForHorizonLevelCapture and videoRotationAngleForHorizonLevelPreview properties, respectively. Each rotation coordinator instance updates its properties so that your app can observe them and immediately apply them to the relevant components.

## Topics

### Creating a rotation coordinator

- [init(device:previewLayer:)](avfoundation/avcapturedevice/rotationcoordinator/init(device:previewlayer:).md)

### Compensating for a device’s rotation

- [videoRotationAngleForHorizonLevelCapture](avfoundation/avcapturedevice/rotationcoordinator/videorotationangleforhorizonlevelcapture.md)
- [videoRotationAngleForHorizonLevelPreview](avfoundation/avcapturedevice/rotationcoordinator/videorotationangleforhorizonlevelpreview.md)

### Inspecting a coordinator’s configuration

- [device](avfoundation/avcapturedevice/rotationcoordinator/device.md)
- [previewLayer](avfoundation/avcapturedevice/rotationcoordinator/previewlayer.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
