---
title: "init(textInput:delegate:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uitextselectiondisplayinteraction/init(textinput:delegate:)"
---

# init(textInput:delegate:)

Creates a new text selection display interaction object for the specified text view.

## Declaration

```swift
init(textInput: any UITextInput, delegate: any UITextSelectionDisplayInteractionDelegate)
```

## Parameters

- `textInput`: The text input view that receives this interaction view.
- `delegate`: An optional delegate object to manage the selection UI views.
