---
title: "delete(in:to:)"
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: "browserenginekit/betextinput/delete(in:to:)"
---

# delete(in:to:)

Deletes the specified amount of text.

## Declaration

```swift
func delete(in direction: UITextStorageDirection, to granularity: UITextGranularity)
```

## Parameters

- `direction`: The direction in which to delete text, relative to the base writing direction.
- `granularity`: The amount of text to delete.

## Mentioned in

Integrating custom browser text views with UIKit

## Discussion

Discussion The editing behavior-to-key combinations include:
