accessibilityFrame(forLineNumber:)
Returns the onscreen frame associated with the specified line number.
Declaration
@MainActor func accessibilityFrame(forLineNumber lineNumber: Int) -> CGRectParameters
- 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: