sectionIndexTitles(for:)
Asks the data source to return the titles for the sections of a table view.
Declaration
optional func sectionIndexTitles(for tableView: UITableView) -> [String]?Parameters
- tableView:
The table-view object requesting this information.
Return Value
An array of strings that serve as the title of sections in the table view and appear in the index list on the right side of the table view. The table view must be in the plain style (UITableViewStylePlain). For example, for an alphabetized list, you could return an array containing strings “A” through “Z”.