<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplication/invalidInterfaceOrientationException",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@UIApplicationInvalidInterfaceOrientationException"
  },
  "title" : "invalidInterfaceOrientationException"
}
-->

# invalidInterfaceOrientationException

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

```
class let invalidInterfaceOrientationException: NSExceptionName
```

## 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`](/documentation/UIKit/UIViewController/preferredInterfaceOrientationForPresentation) method does not match one of the view controller’s supported orientations.

---

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)