---
title: invalidInterfaceOrientationException
framework: uikit
role: symbol
role_heading: Type Property
path: uikit/uiapplication/invalidinterfaceorientationexception
---

# invalidInterfaceOrientationException

An exception that’s thrown if a view controller or the app returns an invalid set of supported interface orientations.

## Declaration

```swift
class let invalidInterfaceOrientationException: NSExceptionName
```

## Discussion

Discussion This exception is thrown if a view controller or the app returns 0 instead of a valid set of supported interface orientation values. It is also thrown if the orientation returned by a view controller’s preferredInterfaceOrientationForPresentation method does not match one of the view controller’s supported orientations.

## See Also

### Managing interface geometry

- [application(_:supportedInterfaceOrientationsFor:)](uikit/uiapplicationdelegate/application(_:supportedinterfaceorientationsfor:).md)
- [UIInterfaceOrientation](uikit/uiinterfaceorientation.md)
- [UIInterfaceOrientationMask](uikit/uiinterfaceorientationmask.md)
