<!--
{
  "availability" : [
    "iOS: 7.0.0 - 9.0.0",
    "iPadOS: 7.0.0 - 9.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "watchOS: 2.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSTextWritingDirection",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@NSTextWritingDirection"
  },
  "title" : "NSTextWritingDirection"
}
-->

# NSTextWritingDirection

Options for specifying text-writing direction.

```
enum NSTextWritingDirection
```

## Overview

You can use the logical OR operator to combine these constants with [`NSWritingDirection.leftToRight`](/documentation/UIKit/NSWritingDirection/leftToRight) or [`NSWritingDirection.rightToLeft`](/documentation/UIKit/NSWritingDirection/rightToLeft) when used with [`writingDirection`](doc://com.apple.documentation/documentation/Foundation/NSAttributedString/Key/writingDirection) to specify formatting controls defined by the Unicode Bidirectional Algorithm in [Unicode Standard Annex #9](http://unicode.org/reports/tr9/).

## Topics

### Constants

[`NSTextWritingDirectionEmbedding`](/documentation/UIKit/NSTextWritingDirection/embedding)

Text is embedded in text with another writing direction.

[`NSTextWritingDirectionOverride`](/documentation/UIKit/NSTextWritingDirection/override)

Enables character types with inherent directionality to be overridden when required for special cases, such as for part numbers made of mixed English, digits, and Hebrew letters to be written from right to left.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)