---
title: UITextDropProposal.Action.replaceSelection
framework: uikit
role: symbol
role_heading: Case
path: uikit/uitextdropproposal/action/replaceselection
---

# UITextDropProposal.Action.replaceSelection

A text drop action style specifying that if the target text view contains a selection, dropped text replaces it.

## Declaration

```swift
case replaceSelection
```

## Discussion

Discussion If the text view does not contain a selection, dropped text is inserted at the provided location, without altering the surrounding text.

## See Also

### Text drop actions

- [UITextDropProposal.Action.insert](uikit/uitextdropproposal/action/insert.md)
- [UITextDropProposal.Action.replaceAll](uikit/uitextdropproposal/action/replaceall.md)
