---
title: "insertSections(_:afterSection:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdiffabledatasourcesnapshot-swift.struct/insertsections(_:aftersection:)"
---

# insertSections(_:afterSection:)

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

## Declaration

```swift
mutating func insertSections(_ identifiers: [SectionIdentifierType], afterSection toIdentifier: SectionIdentifierType)
```

## Parameters

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

## See Also

### Inserting Items and Sections

- [insertItems(_:afterItem:)](appkit/nsdiffabledatasourcesnapshot-swift.struct/insertitems(_:afteritem:).md)
- [insertItems(_:beforeItem:)](appkit/nsdiffabledatasourcesnapshot-swift.struct/insertitems(_:beforeitem:).md)
- [insertSections(_:beforeSection:)](appkit/nsdiffabledatasourcesnapshot-swift.struct/insertsections(_:beforesection:).md)
