---
title: NSTextContentManager
framework: uikit
role: symbol
role_heading: Class
path: uikit/nstextcontentmanager
---

# NSTextContentManager

An abstract class that defines the interface and a default implementation for managing the text document contents.

## Declaration

```swift
class NSTextContentManager
```

## Mentioned in

Adding Writing Tools support to a custom UIKit view

## Topics

### Creating a content manager

- [init()](uikit/nstextcontentmanager/init().md)
- [init(coder:)](uikit/nstextcontentmanager/init(coder:).md)

### Controlling backing store synchronization

- [automaticallySynchronizesToBackingStore](uikit/nstextcontentmanager/automaticallysynchronizestobackingstore.md)

### Performing transactions

- [hasEditingTransaction](uikit/nstextcontentmanager/haseditingtransaction.md)
- [performEditingTransaction(_:)](uikit/nstextcontentmanager/performeditingtransaction(_:).md)
- [recordEditAction(in:newTextRange:)](uikit/nstextcontentmanager/recordeditaction(in:newtextrange:).md)

### Working with layout managers

- [primaryTextLayoutManager](uikit/nstextcontentmanager/primarytextlayoutmanager.md)
- [textLayoutManagers](uikit/nstextcontentmanager/textlayoutmanagers.md)
- [automaticallySynchronizesTextLayoutManagers](uikit/nstextcontentmanager/automaticallysynchronizestextlayoutmanagers.md)
- [addTextLayoutManager(_:)](uikit/nstextcontentmanager/addtextlayoutmanager(_:).md)
- [removeTextLayoutManager(_:)](uikit/nstextcontentmanager/removetextlayoutmanager(_:).md)
- [synchronizeTextLayoutManagers(_:)](uikit/nstextcontentmanager/synchronizetextlayoutmanagers(_:).md)

### Customizing and validating text elements

- [delegate](uikit/nstextcontentmanager/delegate.md)
- [NSTextContentManagerDelegate](uikit/nstextcontentmanagerdelegate.md)
- [NSTextContentManager.EnumerationOptions](uikit/nstextcontentmanager/enumerationoptions.md)

### Finding a specific text element

- [textElements(for:)](uikit/nstextcontentmanager/textelements(for:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [NSTextContentStorage](uikit/nstextcontentstorage.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [NSTextElementProvider](uikit/nstextelementprovider.md)

## See Also

### Text management

- [NSTextContentStorage](uikit/nstextcontentstorage.md)
- [NSAttributedString](foundation/nsattributedstring.md)
- [NSMutableAttributedString](foundation/nsmutableattributedstring.md)
