---
title: "index(ofSectionIdentifier:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nsdiffabledatasourcesnapshotreference/index(ofsectionidentifier:)"
---

# index(ofSectionIdentifier:)

Returns the index of the section of the snapshot with the specified identifier.

## Declaration

```swift
func index(ofSectionIdentifier sectionIdentifier: Any) -> Int
```

## Parameters

- `sectionIdentifier`: The identifier of the section of the snapshot.

## Return Value

Return Value The index of the section of the snapshot, or NSNotFound if the section with the specified identifier doesn’t exist in the snapshot. This index value is 0-based.

## See Also

### Identifying items and sections

- [itemIdentifiers](uikit/nsdiffabledatasourcesnapshotreference/itemidentifiers.md)
- [sectionIdentifiers](uikit/nsdiffabledatasourcesnapshotreference/sectionidentifiers.md)
- [index(ofItemIdentifier:)](uikit/nsdiffabledatasourcesnapshotreference/index(ofitemidentifier:).md)
- [itemIdentifiersInSection(withIdentifier:)](uikit/nsdiffabledatasourcesnapshotreference/itemidentifiersinsection(withidentifier:).md)
- [sectionIdentifier(forSectionContainingItemIdentifier:)](uikit/nsdiffabledatasourcesnapshotreference/sectionidentifier(forsectioncontainingitemidentifier:).md)
