Contents

accessibilityFrame(forLineNumber:)

Returns the onscreen frame associated with the specified line number.

Declaration

@MainActor func accessibilityFrame(forLineNumber lineNumber: Int) -> CGRect

Parameters

  • lineNumber:

    The line number.

Return Value

The frame in the receiver that contains the specified line number, in screen coordinates. By default, this method returns CGRectZero.

Discussion

To determine the onscreen rectangle (or frame) of a line, you can use code such as the following:

See Also

Related Documentation

Accessing the content on a page