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

# UITextDirection

The direction of the text.

```
struct UITextDirection
```

## Overview

This parameter is used in methods declared by the [`UITextInputTokenizer`](/documentation/UIKit/UITextInputTokenizer) protocol. This general direction type subsumes constants of the [`UITextStorageDirection`](/documentation/UIKit/UITextStorageDirection) and [`UITextLayoutDirection`](/documentation/UIKit/UITextLayoutDirection) types.

## Topics

### Text direction types

[`layout(_:)`](/documentation/UIKit/UITextDirection/layout(_:))

Specifies the direction of text layout.

[`storage(_:)`](/documentation/UIKit/UITextDirection/storage(_:))

Specifies the direction of text storage.

### Initializers

[`init(rawValue:)`](/documentation/UIKit/UITextDirection/init(rawValue:))

Creates a text direction with the specified raw value.



---

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)