<!--
{
  "availability" : [
    "iOS: 18.2.0 -",
    "iPadOS: 18.2.0 -",
    "macCatalyst: 18.2.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIWritingToolsCoordinator/TextUpdateReason",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIWritingToolsCoordinatorTextUpdateReason"
  },
  "title" : "UIWritingToolsCoordinator.TextUpdateReason"
}
-->

# UIWritingToolsCoordinator.TextUpdateReason

Constants that specify the reason you updated your view’s content
outside of the Writing Tools workflow.

```
enum TextUpdateReason
```

## Overview

If you modify your view’s text storage while Writing Tools is active,
report those changes to your [`UIWritingToolsCoordinator`](/documentation/UIKit/UIWritingToolsCoordinator) object
so it can track them correctly. Call the
[`updateRange(_:with:reason:forContextWithIdentifier:)`](/documentation/UIKit/UIWritingToolsCoordinator/updateRange(_:with:reason:forContextWithIdentifier:))
method to report changes that occur inside one of your context objects. Call the
[`updateForReflowedTextInContextWithIdentifier(_:)`](/documentation/UIKit/UIWritingToolsCoordinator/updateForReflowedTextInContextWithIdentifier(_:))
method for changes that affect the layout of your text, such as text insertions
before a context object or changes to your view’s frame rectangle.

## Topics

### Getting the reasons

[`case typing`](/documentation/UIKit/UIWritingToolsCoordinator/TextUpdateReason/typing)

An operation that involved a person editing the text in your view.

[`case undoRedo`](/documentation/UIKit/UIWritingToolsCoordinator/TextUpdateReason/undoRedo)

An operation that changed the view’s text as part of an undo or
redo command.

### Initializers

[`init?(rawValue: Int)`](/documentation/UIKit/UIWritingToolsCoordinator/TextUpdateReason/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)