<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RoomPlan",
  "identifier" : "/documentation/RoomPlan/RoomCaptureView/traitCollectionDidChange(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RoomPlan"
    ],
    "preciseIdentifier" : "c:@M@RoomPlan@objc(cs)RoomCaptureView(im)traitCollectionDidChange:"
  },
  "title" : "traitCollectionDidChange(_:)"
}
-->

# traitCollectionDidChange(_:)

Notifies the view when the device orientation changes.

```
@MainActor @preconcurrency override dynamic func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?)
```

## Parameters

`previousTraitCollection`

The prior state of the trait collection before the change occurs.

## Overview

This property inherits from <doc://com.apple.documentation/documentation/UIKit/UIView>.

---

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)