<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITraitCollection/init(preferredContentSizeCategory:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITraitCollection(cm)traitCollectionWithPreferredContentSizeCategory:"
  },
  "title" : "init(preferredContentSizeCategory:)"
}
-->

# init(preferredContentSizeCategory:)

Creates a trait collection that contains only the specified content size category trait.

```
init(preferredContentSizeCategory: UIContentSizeCategory)
```

## Parameters

`preferredContentSizeCategory`

The content size category for the new trait collection. For a list of possible values, see [`UIContentSizeCategory`](/documentation/UIKit/UIContentSizeCategory).

## Return Value

A new trait collection containing only the content size category trait.

## Discussion

---

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)