---
title: "index(forSectionIdentifier:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdiffabledatasourcereference/index(forsectionidentifier:)"
---

# index(forSectionIdentifier:)

Returns an index for the section with the identifier you specify in the table view.

## Declaration

```swift
func index(forSectionIdentifier identifier: Any) -> Int
```

## See Also

### Identifying sections

- [sectionIdentifier(for:)](uikit/uitableviewdiffabledatasourcereference/sectionidentifier(for:).md)
