---
title: "adjust(firstLineRect:bodyRect:lastLineRect:textOrigin:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitextdragpreviewrenderer/adjust(firstlinerect:bodyrect:lastlinerect:textorigin:)"
---

# adjust(firstLineRect:bodyRect:lastLineRect:textOrigin:)

Adjusts the size and origin of the bounding rectangles during a text drag operation.

## Declaration

```swift
func adjust(firstLineRect: UnsafeMutablePointer<CGRect>, bodyRect: UnsafeMutablePointer<CGRect>, lastLineRect: UnsafeMutablePointer<CGRect>, textOrigin origin: CGPoint)
```

## Parameters

- `firstLineRect`: The bounding rectangle for the first line of text in the drag preview.
- `bodyRect`: The bounding rectangle for the text in the middle of the drag preview that doesn’t include the first and last line.
- `lastLineRect`: The bounding rectangle for the last line of text in the drag preview.
- `origin`: The origin of the text preview.

## Discussion

Discussion This method does nothing by default. Subclasses may override this method to change the rectangle calculations; for example, in order to enlarge the rectangles by a few points. If you adjust the rectangles, the drag preview changes accordingly.

## See Also

### Getting and setting bounding rectangles

- [bodyRect](uikit/uitextdragpreviewrenderer/bodyrect.md)
- [firstLineRect](uikit/uitextdragpreviewrenderer/firstlinerect.md)
- [lastLineRect](uikit/uitextdragpreviewrenderer/lastlinerect.md)
