Instance Method

accessibilityRange(for:)

Returns the range of characters for the glyph that includes the specified character.

Required.

Declaration

func accessibilityRange(for index: Int) -> NSRange

Parameters

index

The specified character.

Return Value

The range of characters for the glyph.

Discussion

This value always includes the specified character but may include additional characters if that character is part of a multicharacter glyph.

See Also

Configuring Text Elements

func accessibilityString(for: NSRange) -> String?

Returns the substring for the specified range.

Required.

func accessibilityAttributedString(for: NSRange) -> NSAttributedString?

Returns the attributed substring for the specified range of characters.

Required.

func accessibilityRTF(for: NSRange) -> Data?

Returns the Rich Text Format (RTF) data that describes the specified range of characters.

Required.

func accessibilityFrame(for: NSRange) -> NSRect

Returns the rectangle enclosing the specified range of characters.

Required.

func accessibilityLine(for: Int) -> Int

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

Required.

func accessibilityStyleRange(for: Int) -> NSRange

Returns a range of characters that all have the same style as the specified character.

Required.

func accessibilityRange(forLine: Int) -> NSRange

Returns the range of characters in the specified line.

Required.

func accessibilityRange(for: NSPoint) -> NSRange

Returns the range of characters for the glyph at the specified point.

Required.