---
title: "textContainerChangedGeometry(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nslayoutmanager/textcontainerchangedgeometry(_:)"
---

# textContainerChangedGeometry(_:)

Invalidates the layout information, and possibly glyphs, for the specified text container and all subsequent text container objects.

## Declaration

```swift
func textContainerChangedGeometry(_ container: NSTextContainer)
```

## Parameters

- `container`: The text container whose layout is invalidated.

## Discussion

Discussion This method is invoked automatically by other components of the text system; you should rarely need to invoke it directly. Subclasses of NSTextContainer, however, must invoke this method any time their size of shape changes (a text container that dynamically adjusts its shape to wrap text around placed graphics, for example, must do so when a graphic is added, moved, or removed).

## See Also

### Managing the text containers

- [textContainers](appkit/nslayoutmanager/textcontainers.md)
- [addTextContainer(_:)](appkit/nslayoutmanager/addtextcontainer(_:).md)
- [insertTextContainer(_:at:)](appkit/nslayoutmanager/inserttextcontainer(_:at:).md)
- [removeTextContainer(at:)](appkit/nslayoutmanager/removetextcontainer(at:).md)
- [setTextContainer(_:forGlyphRange:)](appkit/nslayoutmanager/settextcontainer(_:forglyphrange:).md)
- [textContainerChangedTextView(_:)](appkit/nslayoutmanager/textcontainerchangedtextview(_:).md)
- [textContainer(forGlyphAt:effectiveRange:)](appkit/nslayoutmanager/textcontainer(forglyphat:effectiverange:).md)
- [textContainer(forGlyphAt:effectiveRange:withoutAdditionalLayout:)](appkit/nslayoutmanager/textcontainer(forglyphat:effectiverange:withoutadditionallayout:).md)
- [usedRect(for:)](appkit/nslayoutmanager/usedrect(for:).md)
