<!--
{
  "availability" : [
    "iOS: 3.2.0 - 13.0.0",
    "iPadOS: 3.2.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: 9.0.0 - 13.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextWritingDirection",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@T@UITextWritingDirection"
  },
  "title" : "UITextWritingDirection"
}
-->

# UITextWritingDirection

The writing direction of the text for the language.

```
typealias UITextWritingDirection = NSWritingDirection
```

## Discussion

Constants of this type are returned from the [`baseWritingDirection(for:in:)`](/documentation/UIKit/UITextInput/baseWritingDirection(for:in:)) method and are used as arguments of the [`setBaseWritingDirection(_:for:)`](/documentation/UIKit/UITextInput/setBaseWritingDirection(_:for:)) method.

## Topics

### Constants

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

The natural writing direction as defined by the Bidi algorithm.

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

Writing that goes from left to right.

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

Writing that goes from right to left.



---

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)