---
title: "editingRect(forBounds:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitextfield/editingrect(forbounds:)"
---

# editingRect(forBounds:)

Returns the rectangle for displaying editable text.

## Declaration

```swift
func editingRect(forBounds bounds: CGRect) -> CGRect
```

## Parameters

- `bounds`: The bounding rectangle of the receiver.

## Return Value

Return Value The computed editing rectangle for the text.

## Discussion

Discussion You should not call this method directly. If you want to provide a different editing rectangle for the text, you can override this method and return that rectangle. By default, this method returns a region in the text field that is not occupied by any overlay views.

## See Also

### Drawing and positioning overrides

- [textRect(forBounds:)](uikit/uitextfield/textrect(forbounds:).md)
- [drawText(in:)](uikit/uitextfield/drawtext(in:).md)
- [placeholderRect(forBounds:)](uikit/uitextfield/placeholderrect(forbounds:).md)
- [drawPlaceholder(in:)](uikit/uitextfield/drawplaceholder(in:).md)
- [borderRect(forBounds:)](uikit/uitextfield/borderrect(forbounds:).md)
- [clearButtonRect(forBounds:)](uikit/uitextfield/clearbuttonrect(forbounds:).md)
- [leftViewRect(forBounds:)](uikit/uitextfield/leftviewrect(forbounds:).md)
- [rightViewRect(forBounds:)](uikit/uitextfield/rightviewrect(forbounds:).md)
