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
class RotationCoordinatorOverview
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.