<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDeviceOrientation",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIDeviceOrientation"
  },
  "title" : "UIDeviceOrientation"
}
-->

# UIDeviceOrientation

Constants that describe the physical orientation of the device.

```
enum UIDeviceOrientation
```

## Overview

The [`orientation`](/documentation/UIKit/UIDevice/orientation) property uses these constants to identify the device orientation. These constants identify the physical orientation of the device and aren’t tied to the orientation of your app’s user interface.

## Topics

### Device orientations

[`UIDeviceOrientationUnknown`](/documentation/UIKit/UIDeviceOrientation/unknown)

The orientation of the device can’t be determined.

[`UIDeviceOrientationPortrait`](/documentation/UIKit/UIDeviceOrientation/portrait)

The device is in portrait mode, with the device held upright and the front-facing camera at the top.

[`UIDeviceOrientationPortraitUpsideDown`](/documentation/UIKit/UIDeviceOrientation/portraitUpsideDown)

The device is in portrait mode but upside down, with the device held upright and the front-facing camera at the bottom.

[`UIDeviceOrientationLandscapeLeft`](/documentation/UIKit/UIDeviceOrientation/landscapeLeft)

The device is in landscape mode, with the device held upright and the front-facing camera on the left side.

[`UIDeviceOrientationLandscapeRight`](/documentation/UIKit/UIDeviceOrientation/landscapeRight)

The device is in landscape mode, with the device held upright and the front-facing camera on the right side.

[`UIDeviceOrientationFaceUp`](/documentation/UIKit/UIDeviceOrientation/faceUp)

The device is held parallel to the ground with the screen facing upwards.

[`UIDeviceOrientationFaceDown`](/documentation/UIKit/UIDeviceOrientation/faceDown)

The device is held parallel to the ground with the screen facing downwards.

### Orientation testing

[`UIDeviceOrientationIsPortrait`](/documentation/UIKit/UIDeviceOrientation/isPortrait)

A Boolean value that indicates whether the device is in a portrait orientation.

[`UIDeviceOrientationIsLandscape`](/documentation/UIKit/UIDeviceOrientation/isLandscape)

A Boolean value that indicates whether the device is in a landscape orientation.

[`UIDeviceOrientationIsFlat`](/documentation/UIKit/UIDeviceOrientation/isFlat)

A Boolean value that indicates whether the specified orientation is face up or face down.

[`UIDeviceOrientationIsValidInterfaceOrientation`](/documentation/UIKit/UIDeviceOrientation/isValidInterfaceOrientation)

A Boolean value that indicates whether the specified orientation is one of the portrait or landscape orientations.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)