<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureDevice/RotationCoordinator",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureDeviceRotationCoordinator"
  },
  "title" : "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.

```
class RotationCoordinator
```

## Overview

Correctly rotate the photos and movies your app captures, and optionally, a live camera preview, by applying a coordinator’s [`videoRotationAngleForHorizonLevelCapture`](/documentation/AVFoundation/AVCaptureDevice/RotationCoordinator/videoRotationAngleForHorizonLevelCapture) and [`videoRotationAngleForHorizonLevelPreview`](/documentation/AVFoundation/AVCaptureDevice/RotationCoordinator/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:)`](/documentation/AVFoundation/AVCaptureDevice/RotationCoordinator/init(device:previewLayer:))

Creates a coordinator that provides separate compensation angles for content your app takes with a capture device, and for your app’s camera preview.

### Compensating for a device’s rotation

[`videoRotationAngleForHorizonLevelCapture`](/documentation/AVFoundation/AVCaptureDevice/RotationCoordinator/videoRotationAngleForHorizonLevelCapture)

An angle the coordinator provides your app to apply to photos or videos it captures with the device so that they’re level relative to gravity.

[`videoRotationAngleForHorizonLevelPreview`](/documentation/AVFoundation/AVCaptureDevice/RotationCoordinator/videoRotationAngleForHorizonLevelPreview)

An angle the coordinator provides your app to apply to the preview layer so that it’s level relative to gravity.

### Inspecting a coordinator’s configuration

[`device`](/documentation/AVFoundation/AVCaptureDevice/RotationCoordinator/device)

The capture device the coordinator monitors to track its physical rotation.

[`previewLayer`](/documentation/AVFoundation/AVCaptureDevice/RotationCoordinator/previewLayer)

The layer that displays a camera preview the coordinator calculates a video rotation angle for.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)