<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "tvOS: 13.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSDiffableDataSourceSnapshot-swift.struct/moveItem(_:afterItem:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit28NSDiffableDataSourceSnapshotV8moveItem_05afterG0yq__q_tF"
  },
  "title" : "moveItem(_:afterItem:)"
}
-->

# moveItem(_:afterItem:)

Moves the item from its current position in the snapshot to the position immediately after the specified item.

```
mutating func moveItem(_ identifier: ItemIdentifierType, afterItem toIdentifier: ItemIdentifierType)
```

## Parameters

`identifier`

The identifier of the item to move in the snapshot.

`toIdentifier`

The identifier of the item after which to move the specified item.

---

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)