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

# NSWritingDirectionFormatType

Constants for the writing direction attribute key.

```
enum NSWritingDirectionFormatType
```

## Overview

Use these constants as the values for the <doc://com.apple.documentation/documentation/Foundation/NSAttributedString/Key/writingDirection> key in Swift or the [`NSWritingDirectionAttributeName`](/documentation/UIKit/NSWritingDirectionAttributeName) key in Objective-C.

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 the <doc://com.apple.documentation/documentation/Foundation/NSAttributedString/Key/writingDirection> key in Swift or the [`NSWritingDirectionAttributeName`](/documentation/UIKit/NSWritingDirectionAttributeName) key in Objective-C to specify formatting controls defined by the Unicode Bidirectional Algorithm in [Unicode Standard Annex #9](http://unicode.org/reports/tr9/).

## Topics

### Constants

[`NSWritingDirectionEmbedding`](/documentation/UIKit/NSWritingDirectionFormatType/embedding)

Text is embedded in text with another writing direction. For example, an English quotation in the middle of an Arabic sentence could be marked as being embedded left-to-right text.

[`NSWritingDirectionOverride`](/documentation/UIKit/NSWritingDirectionFormatType/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)

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

[`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)