<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutManager/invalidateLayout(forCharacterRange:actualCharacterRange:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSLayoutManager(im)invalidateLayoutForCharacterRange:actualCharacterRange:"
  },
  "title" : "invalidateLayout(forCharacterRange:actualCharacterRange:)"
}
-->

# invalidateLayout(forCharacterRange:actualCharacterRange:)

Invalidates the layout information for the glyphs that map to the specified character range.

```
func invalidateLayout(forCharacterRange charRange: NSRange, actualCharacterRange actualCharRange: NSRangePointer?)
```

## Parameters

`charRange`

The range of characters to invalidate.

`actualCharRange`

If not `NULL`, on output, the actual range invalidated after any necessary expansion.

## Discussion

This method has the same effect as [`invalidateLayout(forCharacterRange:isSoft:actualCharacterRange:)`](/documentation/AppKit/NSLayoutManager/invalidateLayout(forCharacterRange:isSoft:actualCharacterRange:)) with `flag` set to <doc://com.apple.documentation/documentation/Swift/false>.

This method only invalidates information; it performs no glyph generation or layout. You should rarely need to invoke this method.

---

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)