---
title: "invalidateLayout(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nstextlayoutmanager/invalidatelayout(for:)"
---

# invalidateLayout(for:)

Invalidates the layout information for specified text range.

## Declaration

```swift
func invalidateLayout(for range: NSTextRange)
```

## Parameters

- `range`: The range of the layout to invalidate.

## See Also

### Causing layout generation

- [textViewportLayoutController](uikit/nstextlayoutmanager/textviewportlayoutcontroller.md)
- [textLayoutFragment(for:)](uikit/nstextlayoutmanager/textlayoutfragment(for:)-68dez.md)
- [textLayoutFragment(for:)](uikit/nstextlayoutmanager/textlayoutfragment(for:)-4dhrx.md)
- [ensureLayout(for:)](uikit/nstextlayoutmanager/ensurelayout(for:)-6ptsj.md)
- [ensureLayout(for:)](uikit/nstextlayoutmanager/ensurelayout(for:)-3duae.md)
- [enumerateTextLayoutFragments(from:options:using:)](uikit/nstextlayoutmanager/enumeratetextlayoutfragments(from:options:using:).md)
- [NSTextLayoutManager.SegmentType](uikit/nstextlayoutmanager/segmenttype.md)
- [NSTextLayoutManager.SegmentOptions](uikit/nstextlayoutmanager/segmentoptions.md)
