---
title: "insert(_:before:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nsdiffabledatasourcesectionsnapshot-swift.struct/insert(_:before:)-bsrn"
---

# insert(_:before:)

Inserts the provided section snapshot immediately before the item with the specified identifier in the section snapshot.

## Declaration

```swift
mutating func insert(_ snapshot: NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>, before item: ItemIdentifierType)
```

## See Also

### Inserting items

- [insert(_:after:)](uikit/nsdiffabledatasourcesectionsnapshot-swift.struct/insert(_:after:)-9v9c7.md)
- [insert(_:after:)](uikit/nsdiffabledatasourcesectionsnapshot-swift.struct/insert(_:after:)-4it9s.md)
- [insert(_:before:)](uikit/nsdiffabledatasourcesectionsnapshot-swift.struct/insert(_:before:)-5o91y.md)
