---
title: "index(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdiffabledatasource-2euir/index(for:)"
---

# index(for:)

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

## Declaration

```swift
@MainActor @preconcurrency func index(for sectionIdentifier: SectionIdentifierType) -> Int?
```

## See Also

### Identifying sections

- [sectionIdentifier(for:)](uikit/uitableviewdiffabledatasource-2euir/sectionidentifier(for:).md)
