<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSAccessibilityNavigableStaticText/accessibilityLine(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSAccessibilityNavigableStaticText(im)accessibilityLineForIndex:"
  },
  "title" : "accessibilityLine(for:)"
}
-->

# accessibilityLine(for:)

Returns the line number for the line that contains the specified character index.

```
func accessibilityLine(for index: Int) -> Int
```

## Parameters

`index`

The index for a character.

## Return Value

The line number for the line holding the specified character index.

## Discussion

---

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)