---
title: UIInterfaceOrientationMask
framework: uikit
role: symbol
role_heading: Structure
path: uikit/uiinterfaceorientationmask
---

# UIInterfaceOrientationMask

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

## Declaration

```swift
struct UIInterfaceOrientationMask
```

## Overview

Overview Starting in iOS 8, you should employ the UITraitCollection and UITraitEnvironment APIs, and size class properties as used in those APIs, instead of using 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:) method or when determining which orientations to support in your app’s view controllers.

## Topics

### Constants

- [portrait](uikit/uiinterfaceorientationmask/portrait.md)
- [landscapeLeft](uikit/uiinterfaceorientationmask/landscapeleft.md)
- [landscapeRight](uikit/uiinterfaceorientationmask/landscaperight.md)
- [portraitUpsideDown](uikit/uiinterfaceorientationmask/portraitupsidedown.md)
- [landscape](uikit/uiinterfaceorientationmask/landscape.md)
- [all](uikit/uiinterfaceorientationmask/all.md)
- [allButUpsideDown](uikit/uiinterfaceorientationmask/allbutupsidedown.md)

### Initializers

- [init(rawValue:)](uikit/uiinterfaceorientationmask/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Managing interface geometry

- [application(_:supportedInterfaceOrientationsFor:)](uikit/uiapplicationdelegate/application(_:supportedinterfaceorientationsfor:).md)
- [UIInterfaceOrientation](uikit/uiinterfaceorientation.md)
- [invalidInterfaceOrientationException](uikit/uiapplication/invalidinterfaceorientationexception.md)
