Contents

closestPosition(to:)

Returns the position in a document that is closest to a specified point.

Declaration

func closestPosition(to point: CGPoint) -> UITextPosition?

Parameters

  • point:

    A point in the view that is drawing a document’s text.

Return Value

An object locating a position in a document that is closest to point.

See Also

Working with geometry and hit-testing