<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSDiffableDataSourceSnapshotReference/insertItems(withIdentifiers:beforeItemWithIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDiffableDataSourceSnapshot(im)insertItemsWithIdentifiers:beforeItemWithIdentifier:"
  },
  "title" : "insertItems(withIdentifiers:beforeItemWithIdentifier:)"
}
-->

# insertItems(withIdentifiers:beforeItemWithIdentifier:)

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

```
func insertItems(withIdentifiers identifiers: [Any], beforeItemWithIdentifier itemIdentifier: Any)
```

## Parameters

`identifiers`

The array of identifiers corresponding to the items to add to the snapshot.

`itemIdentifier`

The identifier of the item before which to insert the new items.

---

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)