---
title: "moveSection(withIdentifier:afterSectionWithIdentifier:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdiffabledatasourcesnapshotreference/movesection(withidentifier:aftersectionwithidentifier:)"
---

# moveSection(withIdentifier:afterSectionWithIdentifier:)

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

## Declaration

```swift
func moveSection(withIdentifier fromSectionIdentifier: Any, afterSectionWithIdentifier toSectionIdentifier: Any)
```

## Parameters

- `fromSectionIdentifier`: The identifier of the section to move in the snapshot.
- `toSectionIdentifier`: The identifier of the section after which to move the specified section.

## See Also

### Reordering items and sections

- [moveItem(withIdentifier:afterItemWithIdentifier:)](appkit/nsdiffabledatasourcesnapshotreference/moveitem(withidentifier:afteritemwithidentifier:).md)
- [moveItem(withIdentifier:beforeItemWithIdentifier:)](appkit/nsdiffabledatasourcesnapshotreference/moveitem(withidentifier:beforeitemwithidentifier:).md)
- [moveSection(withIdentifier:beforeSectionWithIdentifier:)](appkit/nsdiffabledatasourcesnapshotreference/movesection(withidentifier:beforesectionwithidentifier:).md)
