---
title: "temporaryAttributes(atCharacterIndex:effectiveRange:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nslayoutmanager/temporaryattributes(atcharacterindex:effectiverange:)"
---

# temporaryAttributes(atCharacterIndex:effectiveRange:)

Returns the dictionary of temporary attributes for the specified character range.

## Declaration

```swift
func temporaryAttributes(atCharacterIndex charIndex: Int, effectiveRange effectiveCharRange: NSRangePointer?) -> [NSAttributedString.Key : Any]
```

## Return Value

Return Value The dictionary of temporary attributes for the character range specified in effectiveCharRange at character index charIndex.

## Discussion

Discussion Temporary attributes are used only for onscreen drawing and are not persistent in any way. NSTextView uses them to color misspelled words when continuous spell checking is enabled. Currently the only temporary attributes recognized are those that do not affect layout (colors, underlines, and so on).

## See Also

### Managing temporary attribute support

- [addTemporaryAttributes(_:forCharacterRange:)](appkit/nslayoutmanager/addtemporaryattributes(_:forcharacterrange:).md)
- [addTemporaryAttribute(_:value:forCharacterRange:)](appkit/nslayoutmanager/addtemporaryattribute(_:value:forcharacterrange:).md)
- [setTemporaryAttributes(_:forCharacterRange:)](appkit/nslayoutmanager/settemporaryattributes(_:forcharacterrange:).md)
- [removeTemporaryAttribute(_:forCharacterRange:)](appkit/nslayoutmanager/removetemporaryattribute(_:forcharacterrange:).md)
- [temporaryAttribute(_:atCharacterIndex:effectiveRange:)](appkit/nslayoutmanager/temporaryattribute(_:atcharacterindex:effectiverange:).md)
- [temporaryAttribute(_:atCharacterIndex:longestEffectiveRange:in:)](appkit/nslayoutmanager/temporaryattribute(_:atcharacterindex:longesteffectiverange:in:).md)
- [temporaryAttributes(atCharacterIndex:longestEffectiveRange:in:)](appkit/nslayoutmanager/temporaryattributes(atcharacterindex:longesteffectiverange:in:).md)
