---
title: "invalidateAttributes(in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextstorage/invalidateattributes(in:)"
---

# invalidateAttributes(in:)

Invalidates attributes in the specified range.

## Declaration

```swift
func invalidateAttributes(in range: NSRange)
```

## Parameters

- `range`: The range of characters whose attributes the method should invalidate.

## Discussion

Discussion Called from processEditing() to invalidate attributes when the text storage changes. If the receiver isn’t lazy, this method calls fixAttributes(in:). If lazy attribute fixing is in effect, this method instead records the range needing fixing.

## See Also

### Fixing the string attributes

- [ensureAttributesAreFixed(in:)](appkit/nstextstorage/ensureattributesarefixed(in:).md)
- [fixesAttributesLazily](appkit/nstextstorage/fixesattributeslazily.md)
