<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutManagerDelegate/layoutManager(_:textContainer:didChangeGeometryFrom:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSLayoutManagerDelegate(im)layoutManager:textContainer:didChangeGeometryFromSize:"
  },
  "title" : "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.

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

## 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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)