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

# UITextFormattingViewController

A view controller that manages the interface for common text formatting options.

```
@MainActor class UITextFormattingViewController
```

## Topics

### Classes

[`class Component`](/documentation/UIKit/UITextFormattingViewController/Component)

Defines text formatting view component.

[`class ComponentGroup`](/documentation/UIKit/UITextFormattingViewController/ComponentGroup)

Defines grouping of text formatting components in view.

[`class Configuration`](/documentation/UIKit/UITextFormattingViewController/Configuration-swift.class)

Text formatting view controller configuration object.

[`@interface UITextFormattingViewControllerChangeValue : NSObject`](/documentation/UIKit/UITextFormattingViewControllerChangeValue)

Describes text formatting change that is a result of user action.
Contains type of change, any associated value that may be applicable to that change.

[`@interface UITextFormattingViewControllerFormattingDescriptor : NSObject`](/documentation/UIKit/UITextFormattingViewControllerFormattingDescriptor)

Object that represents current text formatting state.
This can apply to formatting state of some selected range of text or currently applicable input formatting.

[`@interface UITextFormattingViewControllerFormattingStyle : NSObject`](/documentation/UIKit/UITextFormattingViewControllerFormattingStyle)

Type that defines formatting style presented in text formatting view.

### Global variables

[`static let fontAttributes: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/fontAttributes)

[`static let fontPicker: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/fontPicker)

[`static let fontPointSize: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/fontPointSize)

[`static let fontSize: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/fontSize)

[`static let formattingStyles: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/formattingStyles)

[`static let highlight: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/highlight)

[`static let highlightPicker: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/highlightPicker)

[`static let lineHeight: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/lineHeight)

[`static let listStyles: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/listStyles)

[`static let textAlignment: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/textAlignment)

[`static let textAlignmentAndJustification: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/textAlignmentAndJustification)

[`static let textColor: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/textColor)

[`static let textIndentation: UITextFormattingViewController.ComponentKey`](/documentation/UIKit/UITextFormattingViewController/ComponentKey/textIndentation)

[`static let blue: UITextFormattingViewController.Highlight`](/documentation/UIKit/UITextFormattingViewController/Highlight/blue)

[`static let `default`: UITextFormattingViewController.Highlight`](/documentation/UIKit/UITextFormattingViewController/Highlight/default)

[`static let mint: UITextFormattingViewController.Highlight`](/documentation/UIKit/UITextFormattingViewController/Highlight/mint)

[`static let orange: UITextFormattingViewController.Highlight`](/documentation/UIKit/UITextFormattingViewController/Highlight/orange)

[`static let pink: UITextFormattingViewController.Highlight`](/documentation/UIKit/UITextFormattingViewController/Highlight/pink)

[`static let purple: UITextFormattingViewController.Highlight`](/documentation/UIKit/UITextFormattingViewController/Highlight/purple)

[`static let center: UITextFormattingViewController.TextAlignment`](/documentation/UIKit/UITextFormattingViewController/TextAlignment/center)

[`static let justified: UITextFormattingViewController.TextAlignment`](/documentation/UIKit/UITextFormattingViewController/TextAlignment/justified)

[`static let left: UITextFormattingViewController.TextAlignment`](/documentation/UIKit/UITextFormattingViewController/TextAlignment/left)

[`static let natural: UITextFormattingViewController.TextAlignment`](/documentation/UIKit/UITextFormattingViewController/TextAlignment/natural)

[`static let right: UITextFormattingViewController.TextAlignment`](/documentation/UIKit/UITextFormattingViewController/TextAlignment/right)

[`static let decimal: UITextFormattingViewController.TextList`](/documentation/UIKit/UITextFormattingViewController/TextList/decimal)

[`static let disc: UITextFormattingViewController.TextList`](/documentation/UIKit/UITextFormattingViewController/TextList/disc)

[`static let hyphen: UITextFormattingViewController.TextList`](/documentation/UIKit/UITextFormattingViewController/TextList/hyphen)

[`static let other: UITextFormattingViewController.TextList`](/documentation/UIKit/UITextFormattingViewController/TextList/other)

### Protocols

[`@protocol UITextFormattingViewControllerDelegate <NSObject>`](/documentation/UIKit/UITextFormattingViewControllerDelegate)

### Protocols

[`protocol Delegate`](/documentation/UIKit/UITextFormattingViewController/Delegate-swift.protocol)

### Structures

[`struct FormattingDescriptor`](/documentation/UIKit/UITextFormattingViewController/FormattingDescriptor-swift.struct)

[`struct FormattingStyle`](/documentation/UIKit/UITextFormattingViewController/FormattingStyle)

### Initializers

[`init()`](/documentation/UIKit/UITextFormattingViewController/init())

[`init(configuration: UITextFormattingViewController.Configuration)`](/documentation/UIKit/UITextFormattingViewController/init(configuration:))

### Instance Properties

[`var configuration: UITextFormattingViewController.Configuration`](/documentation/UIKit/UITextFormattingViewController/configuration-swift.property)

Current text formatting configuration object.

[`var delegate: (any UITextFormattingViewController.Delegate)?`](/documentation/UIKit/UITextFormattingViewController/delegate-52zfw)

[`var formattingDescriptor: UITextFormattingViewController.FormattingDescriptor?`](/documentation/UIKit/UITextFormattingViewController/formattingDescriptor-9sir9)

### Enumerations

[`enum ChangeValue`](/documentation/UIKit/UITextFormattingViewController/ChangeValue)

## Relationships

### Conforms To

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

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`UIStateRestoring`](/documentation/UIKit/UIStateRestoring)

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

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

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

[`UIContentContainer`](/documentation/UIKit/UIContentContainer)

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

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

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

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

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

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

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

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

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

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

### Inherits From

[`UIViewController`](/documentation/UIKit/UIViewController)

---

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)