<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMutableAttributedString/endEditing()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMutableAttributedString(im)endEditing"
  },
  "title" : "endEditing()"
}
-->

# endEditing()

Ends the buffering of changes to the string’s characters and attributes.

```
func endEditing()
```

## Discussion

Override this method in a subclass to consolidate changes made since a previous call to [`beginEditing()`](/documentation/Foundation/NSMutableAttributedString/beginEditing()). When you call this method, the string notifies observers of the changes.

The default implementation of this method does nothing. Subclasses such as <doc://com.apple.documentation/documentation/AppKit/NSTextStorage> override this method and use it to tell the layout manager to update the text layout.

## See Also

  <doc://com.apple.documentation/documentation/AppKit/NSTextStorage/processEditing()>



---

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)