Skip to content

Instantly share code, notes, and snippets.

@krzyzanowskim
Created March 26, 2025 21:09
Show Gist options
  • Save krzyzanowskim/da247e1a9f5f94f0e14a1e3047b86e59 to your computer and use it in GitHub Desktop.
Save krzyzanowskim/da247e1a9f5f94f0e14a1e3047b86e59 to your computer and use it in GitHub Desktop.
FB17020435 enumerateCaretOffsetsInLineFragmentAtLocation:usingBlock: documentation is not accurate

The documentation to the NSTextSelectionDataSource.enumerateCaretOffsetsInLineFragmentAtLocation:usingBlock regarding location parameter is not correct.

Online version https://developer.apple.com/documentation/uikit/nstextselectiondatasource/enumeratecaretoffsetsinlinefragment(at:using:)?language=objc

Documentations says: location - The NSTextLocation to start from.

however it is not where the enumeration starts. It is the location used to determine which line fragment to enumerate. The enumeration start from the line fragment location instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment