---
title: traitCollection
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiconfigurationstate-8d7pd/traitcollection
---

# traitCollection

The traits that describe the current layout environment of the view, such as the user interface style and layout direction.

## Declaration

```swift
var traitCollection: UITraitCollection { get set }
```

## See Also

### Managing configuration states

- [subscript(_:)](uikit/uiconfigurationstate-8d7pd/subscript(_:).md)
