Contents

adjust(firstLineRect:bodyRect:lastLineRect:textOrigin:)

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

Declaration

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

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