---
title: "sectionIndexTitles(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdatasource/sectionindextitles(for:)"
---

# sectionIndexTitles(for:)

Asks the data source to return the titles for the sections of a table view.

## Declaration

```swift
optional func sectionIndexTitles(for tableView: UITableView) -> [String]?
```

## Parameters

- `tableView`: The table-view object requesting this information.

## Return Value

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”.

## See Also

### Configuring an index

- [tableView(_:sectionForSectionIndexTitle:at:)](uikit/uitableviewdatasource/tableview(_:sectionforsectionindextitle:at:).md)
