<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextLayoutManager/enumerateRenderingAttributes(from:reverse:using:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextLayoutManager(im)enumerateRenderingAttributesFromLocation:reverse:usingBlock:"
  },
  "title" : "enumerateRenderingAttributes(from:reverse:using:)"
}
-->

# enumerateRenderingAttributes(from:reverse:using:)

Enumerates the rendering attributes from a location you specify.

```
func enumerateRenderingAttributes(from location: any NSTextLocation, reverse: Bool, using block: (NSTextLayoutManager, [NSAttributedString.Key : Any], NSTextRange) -> Bool)
```

## Parameters

`location`

The location at which to start the enumeration.

`reverse`

Whether to start the enumeration from the end of the range.

`block`

A closure you provide to determine if the enumeration finishes early.

## Discussion

This method only enumerates ranges with text that specify rendering attributes. Returning `false` from `block` breaks out of the enumeration.

---

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)