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

# UIInterfaceOrientationMask

Constants that specify a view controller’s supported interface orientations.

```
struct UIInterfaceOrientationMask
```

## Overview

Starting in iOS 8, you should employ the [`UITraitCollection`](/documentation/UIKit/UITraitCollection) and [`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment) APIs, and size class properties as used in those APIs, instead of using [`UIInterfaceOrientation`](/documentation/UIKit/UIInterfaceOrientation) constants or otherwise writing your app in terms of interface orientation.

In earlier versions of iOS, you returned these constants from the [`supportedInterfaceOrientations(for:)`](/documentation/UIKit/UIApplication/supportedInterfaceOrientations(for:)) method or when determining which orientations to support in your app’s view controllers.

## Topics

### Constants

[`portrait`](/documentation/UIKit/UIInterfaceOrientationMask/portrait)

The view controller supports a portrait interface orientation.

[`landscapeLeft`](/documentation/UIKit/UIInterfaceOrientationMask/landscapeLeft)

The view controller supports a landscape-left interface orientation.

[`landscapeRight`](/documentation/UIKit/UIInterfaceOrientationMask/landscapeRight)

The view controller supports a landscape-right interface orientation.

[`portraitUpsideDown`](/documentation/UIKit/UIInterfaceOrientationMask/portraitUpsideDown)

The view controller supports an upside-down portrait interface orientation.

[`landscape`](/documentation/UIKit/UIInterfaceOrientationMask/landscape)

The view controller supports both landscape-left and landscape-right interface orientation.

[`all`](/documentation/UIKit/UIInterfaceOrientationMask/all)

The view controller supports all interface orientations.

[`allButUpsideDown`](/documentation/UIKit/UIInterfaceOrientationMask/allButUpsideDown)

The view controller supports all but the upside-down portrait interface orientation.

### Initializers

[`init(rawValue:)`](/documentation/UIKit/UIInterfaceOrientationMask/init(rawValue:))

Creates a new instance with the specified raw value.



---

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)