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

# UITextGranularity

The granularity of a unit of text.

```
enum UITextGranularity
```

## Overview

Constants of this type are used as parameters in all methods of the `UITextInputTokenizer` protocol.

## Topics

### Constants

[`UITextGranularityCharacter`](/documentation/UIKit/UITextGranularity/character)

[`UITextGranularityWord`](/documentation/UIKit/UITextGranularity/word)

[`UITextGranularitySentence`](/documentation/UIKit/UITextGranularity/sentence)

[`UITextGranularityParagraph`](/documentation/UIKit/UITextGranularity/paragraph)

[`UITextGranularityLine`](/documentation/UIKit/UITextGranularity/line)

[`UITextGranularityDocument`](/documentation/UIKit/UITextGranularity/document)

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)