<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextFormattingViewController/Component",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITextFormattingViewControllerComponent"
  },
  "title" : "UITextFormattingViewController.Component"
}
-->

# UITextFormattingViewController.Component

Defines text formatting view component.

```
class Component
```

## Topics

### Initializers

[`init?(coder: NSCoder)`](/documentation/UIKit/UITextFormattingViewController/Component/init(coder:))

[`init(componentKey: UITextFormattingViewController.ComponentKey, preferredSize: UITextFormattingViewController.ComponentSize)`](/documentation/UIKit/UITextFormattingViewController/Component/init(componentKey:preferredSize:))

Creates a text formatting view component configuration with component key and preferred size.

### Instance Properties

[`var componentKey: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/Component/componentKey)

Unique key that identifies text formatting view component.

[`var preferredSize: UITextFormattingViewController.ComponentSize`](/documentation/UIKit/UITextFormattingViewController/Component/preferredSize)

Specifies preferred size of the component in text formatting view.

### Type Methods

[`static func component(UITextFormattingViewController.ComponentKey, UITextFormattingViewController.ComponentSize) -> UITextFormattingViewController.Component`](/documentation/UIKit/UITextFormattingViewController/Component/component(_:_:))

## Relationships

### Conforms To

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)