---
title: hasText
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uikeyinput/hastext
---

# hasText

A Boolean value that indicates whether the text-entry object has any text.

## Declaration

```swift
var hasText: Bool { get }
```

## Mentioned in

Handling text interactions in custom keyboards

## Return Value

Return Value true if the backing store has textual content, false otherwise.

## See Also

### Inserting and deleting text

- [insertText(_:)](uikit/uikeyinput/inserttext(_:).md)
- [deleteBackward()](uikit/uikeyinput/deletebackward().md)
