---
title: "layoutManager(_:textContainer:didChangeGeometryFrom:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nslayoutmanagerdelegate/layoutmanager(_:textcontainer:didchangegeometryfrom:)"
---

# layoutManager(_:textContainer:didChangeGeometryFrom:)

Informs the delegate when the layout manager invalidates layout due to a change in the geometry of the specified text container.

## Declaration

```swift
optional func layoutManager(_ layoutManager: NSLayoutManager, textContainer: NSTextContainer, didChangeGeometryFrom oldSize: CGSize)
```

## Parameters

- `layoutManager`: The layout manager invalidating layout.
- `textContainer`: The text container that changed geometry.
- `oldSize`: The size of the text container before it changed geometry.

## Discussion

Discussion The delegate can react to the geometry change and perform adjustments such as recreating an exclusion path.

## See Also

### Responding to text container layout

- [layoutManager(_:didCompleteLayoutFor:atEnd:)](uikit/nslayoutmanagerdelegate/layoutmanager(_:didcompletelayoutfor:atend:).md)
