---
title: "layoutManagerDidInvalidateLayout(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nslayoutmanagerdelegate/layoutmanagerdidinvalidatelayout(_:)"
---

# layoutManagerDidInvalidateLayout(_:)

Informs the delegate when the specified layout manager invalidates layout information (not glyph information).

## Declaration

```swift
optional func layoutManagerDidInvalidateLayout(_ sender: NSLayoutManager)
```

## Parameters

- `sender`: The layout manager that invalidated layout.

## Discussion

Discussion This method is invoked only when layout was complete and then became invalidated for some reason. Delegates can use this information to show an indicator of background layout or to enable a button that forces immediate layout of text.

## See Also

### Invalidating glyphs and layout

- [layoutManager(_:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:)](appkit/nslayoutmanagerdelegate/layoutmanager(_:shouldgenerateglyphs:properties:characterindexes:font:forglyphrange:).md)
- [layoutManager(_:shouldUse:forControlCharacterAt:)](appkit/nslayoutmanagerdelegate/layoutmanager(_:shoulduse:forcontrolcharacterat:).md)
- [NSLayoutManager.ControlCharacterAction](appkit/nslayoutmanager/controlcharacteraction.md)
