<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIAccessibilityReadingContent/accessibilityFrame(forLineNumber:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIAccessibilityReadingContent(im)accessibilityFrameForLineNumber:"
  },
  "title" : "accessibilityFrame(forLineNumber:)"
}
-->

# accessibilityFrame(forLineNumber:)

Returns the onscreen frame associated with the specified line number.

```
@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:

```swift
let lineBounds: CGRect = // the bounds of the line in view space
let view: UIView = // the relevant view
return UIAccessibilityConvertFrameToScreenCoordinates(lineBounds, view)
```

## See Also

[`UIAccessibilityConvertFrameToScreenCoordinates`](/documentation/UIKit/UIAccessibility/convertToScreenCoordinates(_:in:)-9ziiu)

Converts the specified rectangle from view coordinates to screen coordinates.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)