section(forSectionIndexTitle:)
Returns the section that the table view should scroll to for the given index title.
Declaration
func section(forSectionIndexTitle indexTitleIndex: Int) -> IntParameters
- indexTitleIndex:
An integer identifying a section-index title by its position in the array of such titles.
Return Value
An integer identifying the table-view section associated with indexTitleIndex.
Discussion
This method allows the table view to map between a given item in the section index and a given section even when there isn’t a one-to-one mapping. In its implementation of tableView(_:sectionForSectionIndexTitle:at:), the data source can call this method on the indexed-collation object specifying as an argument the passed-in index integer; it then returns the result to the table view.