---
title: traitCollection
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiwindowscene/traitcollection
---

# traitCollection

The traits that describe the current environment of the scene.

## Declaration

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

## Discussion

Discussion Use this property to get additional information about the current scene, such as the size class and scale factor. For more information about the available traits, see UITraitCollection.

## See Also

### Getting the interface attributes

- [sizeRestrictions](uikit/uiwindowscene/sizerestrictions.md)
- [UISceneSizeRestrictions](uikit/uiscenesizerestrictions.md)
