init(layoutManager:range:unifyRects:)
Returns an initialized renderer of a text drag preview with the specified layout manager, range, and rectangle detection behavior.
Declaration
init(layoutManager: NSLayoutManager, range: NSRange, unifyRects: Bool)Parameters
- layoutManager:
The layout manager that renders the preview.
- range:
The range to render the preview.
- unifyRects:
A Boolean value that indicates whether the vertical position and height of the detection rectangles adjust to touch each other. If
true, the Firstlinerect, Bodyrect, and Lastlinerect properties adjust; otherwise, they don’t. The default value istrue.
Return Value
A renderer of a text drag preview using the specified layout manager, range, and detection behavior.