<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDevice/orientation",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDevice(py)orientation"
  },
  "title" : "orientation"
}
-->

# orientation

The physical orientation of the device.

```
var orientation: UIDeviceOrientation { get }
```

## Discussion

The value of the property is a constant that indicates the current orientation of the device. This value represents the physical orientation of the device and may be different from the current orientation of your application’s user interface. See [`UIDeviceOrientation`](/documentation/UIKit/UIDeviceOrientation) for descriptions of the possible values.

The value of this property always returns 0 unless orientation notifications have been enabled by calling [`beginGeneratingDeviceOrientationNotifications()`](/documentation/UIKit/UIDevice/beginGeneratingDeviceOrientationNotifications()).

---

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)