<!--
{
  "availability" : [
    "iOS: 8.0.0 - 17.0.0",
    "iPadOS: 8.0.0 - 17.0.0",
    "macCatalyst: 13.1.0 - 17.0.0",
    "tvOS: -",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPresentationController/overrideTraitCollection",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPresentationController(py)overrideTraitCollection"
  },
  "title" : "overrideTraitCollection"
}
-->

# overrideTraitCollection

Interface traits for the presented view controller, to use in place of traits from the iOS environment.

```
@NSCopying var overrideTraitCollection: UITraitCollection? { get set }
```

## Discussion

Use this property to provide an interface trait collection for the presented view controller, overriding one or more values in the iOS trait environment.

Each value you place in the [`overrideTraitCollection`](/documentation/UIKit/UIPresentationController/overrideTraitCollection) property overrides the corresponding value in the iOS trait environment. For example, the following code snippet shows how to override the display scale for the presented view controller, leaving other traits as they are provided by the system. Place such code, typically, in the implementation file for the presenting view controller:

```objc
presentedVC.presentationController.overrideTraitCollection = [UITraitCollection traitCollectionWithDisplayScale: 1.5];
[self presentViewController: presentedVC animated: NO completion: nil];
```

The *presenting* view controller is not affected by use of this property.

The default value of the [`overrideTraitCollection`](/documentation/UIKit/UIPresentationController/overrideTraitCollection) property is `nil`, which results in the full iOS trait environment being used by the presented view controller.

---

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)