---
title: "moveSection(_:afterSection:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdiffabledatasourcesnapshot-swift.struct/movesection(_:aftersection:)"
---

# moveSection(_:afterSection:)

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

## Declaration

```swift
mutating func moveSection(_ identifier: SectionIdentifierType, afterSection toIdentifier: SectionIdentifierType)
```

## Parameters

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

## See Also

### Reordering Items and Sections

- [moveItem(_:afterItem:)](appkit/nsdiffabledatasourcesnapshot-swift.struct/moveitem(_:afteritem:).md)
- [moveItem(_:beforeItem:)](appkit/nsdiffabledatasourcesnapshot-swift.struct/moveitem(_:beforeitem:).md)
- [moveSection(_:beforeSection:)](appkit/nsdiffabledatasourcesnapshot-swift.struct/movesection(_:beforesection:).md)
