---
title: "moveItem(_:afterItem:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nsdiffabledatasourcesnapshot-swift.struct/moveitem(_:afteritem:)"
---

# moveItem(_:afterItem:)

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

## Declaration

```swift
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.

## See Also

### Reordering items and sections

- [moveItem(_:beforeItem:)](uikit/nsdiffabledatasourcesnapshot-swift.struct/moveitem(_:beforeitem:).md)
- [moveSection(_:afterSection:)](uikit/nsdiffabledatasourcesnapshot-swift.struct/movesection(_:aftersection:).md)
- [moveSection(_:beforeSection:)](uikit/nsdiffabledatasourcesnapshot-swift.struct/movesection(_:beforesection:).md)
