<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextDropProposal/Action/replaceSelection",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UITextDropAction@UITextDropActionReplaceSelection"
  },
  "title" : "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.

```
case replaceSelection
```

## Discussion

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

---

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)