<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSTextContentManagerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTextContentManagerDelegate"
  },
  "title" : "NSTextContentManagerDelegate"
}
-->

# NSTextContentManagerDelegate

The optional methods that delegates of content manager objects implement for customizing or validating text elements.

```
protocol NSTextContentManagerDelegate : NSObjectProtocol
```

## Topics

### Finding a text element at a specific location

[`func textContentManager(NSTextContentManager, textElementAt: any NSTextLocation) -> NSTextElement?`](/documentation/UIKit/NSTextContentManagerDelegate/textContentManager(_:textElementAt:))

The method the framework calls to return the text element at a specific location.

### Validating a text element

[`func textContentManager(NSTextContentManager, shouldEnumerate: NSTextElement, options: NSTextContentManager.EnumerationOptions) -> Bool`](/documentation/UIKit/NSTextContentManagerDelegate/textContentManager(_:shouldEnumerate:options:))

Returns a Boolean value that indicates whether the framework should skip this text element in the enumeration.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherited By

[`NSTextContentStorageDelegate`](/documentation/UIKit/NSTextContentStorageDelegate)

---

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)