---
title: textInput
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextinteraction/textinput
---

# textInput

The object that interacts with the text input system.

## Declaration

```swift
weak var textInput: (any UIResponder & UITextInput)? { get set }
```

## Discussion

Discussion The object that you assign to textInput can be different than the view that contains the text interaction. For example, you may want the gestures for the text interaction to work on a container view, such as a scroll view, while managing the text selection behavior in a contained view, such as the one drawing the text.

## See Also

### Handling text input and interaction events

- [delegate](uikit/uitextinteraction/delegate.md)
- [UITextInteractionDelegate](uikit/uitextinteractiondelegate.md)
