<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/DocumentAttributeKey/textLayoutSections",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation",
      "UIKit"
    ],
    "preciseIdentifier" : "c:@NSTextLayoutSectionsAttribute"
  },
  "title" : "textLayoutSections"
}
-->

# textLayoutSections

The layout orientations for each section.

```
static let textLayoutSections: NSAttributedString.DocumentAttributeKey
```

## Discussion

An [NSArray](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/PropertyLists/OldStylePlists/OldStylePLists.html#//apple_ref/doc/uid/20001012-47205) containing [`NSDictionary`](/documentation/Foundation/NSDictionary) objects, each dictionary describing a layout orientation section. The dictionary can have two attributes: [`orientation`](/documentation/Foundation/NSAttributedString/TextLayoutSectionKey/orientation) and [`range`](/documentation/Foundation/NSAttributedString/TextLayoutSectionKey/range). When there is a gap between sections, it’s assumed to have <doc://com.apple.documentation/documentation/AppKit/NSLayoutManager/TextLayoutOrientation/horizontal>.

---

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)