<!--
{
  "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/moveSection(_:afterSection:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit28NSDiffableDataSourceSnapshotV11moveSection_05afterG0yx_xtF"
  },
  "title" : "moveSection(_:afterSection:)"
}
-->

# moveSection(_:afterSection:)

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

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

---

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)