Instance Method

itemNumber(in:at:)

Returns the index of the item at the given location within the list.

Declaration

func itemNumber(in list: NSTextList, at location: Int) -> Int

Parameters

list

The text list.

location

The location of the item.

Return Value

Returns the index within the list.

See Also

Calculating Ranges

func range(of: NSTextBlock, at: Int) -> NSRange

Returns the range of the individual text block that contains the given location.

func range(of: NSTextList, at: Int) -> NSRange

Returns the range of the given text list that contains the given location.

func range(of: NSTextTable, at: Int) -> NSRange

Returns the range of the given text table that contains the given location