---
title: beginEditing()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsmutableattributedstring/beginediting()
---

# beginEditing()

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

## Declaration

```swift
func beginEditing()
```

## Discussion

Discussion Override this method in a subclass to buffer or optimize a series of changes to the string’s characters or attributes. The string continues to buffer text until you call endEditing(), at which time it consolidates the changes and notifies observers. You can nest pairs of beginEditing() and endEditing() messages.

## See Also

### Grouping Changes

- [endEditing()](foundation/nsmutableattributedstring/endediting().md)
