---
title: selectedText
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextdocumentproxy/selectedtext
---

# selectedText

The currently selected text in the document.

## Declaration

```swift
var selectedText: String? { get }
```
