Contents

selectionRects(for:)

Returns an array of selection rects corresponding to the range of text.

Declaration

func selectionRects(for range: UITextRange) -> [UITextSelectionRect]

Parameters

  • range:

    An object representing a range in a document’s text.

Return Value

An array of UITextSelectionRect objects that encompass the selection.

See Also

Working with geometry and hit-testing