---
title: "insertSections(withIdentifiers:afterSectionWithIdentifier:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nsdiffabledatasourcesnapshotreference/insertsections(withidentifiers:aftersectionwithidentifier:)"
---

# insertSections(withIdentifiers:afterSectionWithIdentifier:)

Inserts the provided sections immediately after the section with the specified identifier in the snapshot.

## Declaration

```swift
func insertSections(withIdentifiers sectionIdentifiers: [Any], afterSectionWithIdentifier toSectionIdentifier: Any)
```

## Parameters

- `sectionIdentifiers`: The array of identifiers corresponding to the sections to add to the snapshot.
- `toSectionIdentifier`: The identifier of the section after which to insert the new sections.

## See Also

### Inserting items and sections

- [insertItems(withIdentifiers:afterItemWithIdentifier:)](uikit/nsdiffabledatasourcesnapshotreference/insertitems(withidentifiers:afteritemwithidentifier:).md)
- [insertItems(withIdentifiers:beforeItemWithIdentifier:)](uikit/nsdiffabledatasourcesnapshotreference/insertitems(withidentifiers:beforeitemwithidentifier:).md)
- [insertSections(withIdentifiers:beforeSectionWithIdentifier:)](uikit/nsdiffabledatasourcesnapshotreference/insertsections(withidentifiers:beforesectionwithidentifier:).md)
