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

# UITextSelectionDisplayInteractionDelegate

An object you use to customize the presentation of text selections in your interface.

```
@MainActor protocol UITextSelectionDisplayInteractionDelegate : NSObjectProtocol
```

## Overview

Adopt the [`UITextSelectionDisplayInteractionDelegate`](/documentation/UIKit/UITextSelectionDisplayInteractionDelegate) protocol in a custom type that you use to customize the selection UI implementation. The [`UITextSelectionDisplayInteraction`](/documentation/UIKit/UITextSelectionDisplayInteraction) object manages separate views to draw the text selection, the handles for the selected text range, and the insertion-point caret. Use this protocol if you use a custom view to manage these views instead of the text input view. For example, provide a container view if you draw the selection UI behind your text view’s content.

## Topics

### Providing a container view

[`func selectionContainerViewBelowText(for: UITextSelectionDisplayInteraction) -> UIView?`](/documentation/UIKit/UITextSelectionDisplayInteractionDelegate/selectionContainerViewBelowText(for:))

Returns the container view to hold the selection-related highlight and detail views.

## Relationships

### Inherits From

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

---

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)