<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "tvOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSDiffableDataSourceSectionSnapshot-swift.struct/insert(_:before:)-bsrn",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit35NSDiffableDataSourceSectionSnapshotV6insert_6beforeyACyxG_xtF"
  },
  "title" : "insert(_:before:)"
}
-->

# insert(_:before:)

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

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)