---
title: "traitCollectionDidChange(_:)"
framework: roomplan
role: symbol
role_heading: Instance Method
path: "roomplan/roomcaptureview/traitcollectiondidchange(_:)"
---

# traitCollectionDidChange(_:)

Notifies the view when the device orientation changes.

## Declaration

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

## Parameters

- `previousTraitCollection`: The prior state of the trait collection before the change occurs.

## Overview

Overview This property inherits from UIView.

## See Also

### Accessing view features

- [subviews](roomplan/roomcaptureview/subviews.md)
- [layoutSubviews()](roomplan/roomcaptureview/layoutsubviews().md)
- [encode(with:)](roomplan/roomcaptureview/encode(with:).md)
