---
title: "setRenderingAttributes(_:for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nstextlayoutmanager/setrenderingattributes(_:for:)"
---

# setRenderingAttributes(_:for:)

Sets the rendering attributes for the range you specify.

## Declaration

```swift
func setRenderingAttributes(_ renderingAttributes: [NSAttributedString.Key : Any], for textRange: NSTextRange)
```

## Parameters

- `renderingAttributes`: A dictionary of rendering attributes.
- `textRange`: The text range over which to apply renderingAttributes.

## See Also

### Adjusting rendering

- [linkRenderingAttributes](uikit/nstextlayoutmanager/linkrenderingattributes.md)
- [addRenderingAttribute(_:value:for:)](uikit/nstextlayoutmanager/addrenderingattribute(_:value:for:).md)
- [enumerateRenderingAttributes(from:reverse:using:)](uikit/nstextlayoutmanager/enumeraterenderingattributes(from:reverse:using:).md)
- [renderingAttributes(forLink:at:)](uikit/nstextlayoutmanager/renderingattributes(forlink:at:).md)
- [invalidateRenderingAttributes(for:)](uikit/nstextlayoutmanager/invalidaterenderingattributes(for:).md)
- [removeRenderingAttribute(_:for:)](uikit/nstextlayoutmanager/removerenderingattribute(_:for:).md)
