<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "tvOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewDiffableDataSource-9tqpa/ReorderingHandlers-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit34UICollectionViewDiffableDataSourceC18ReorderingHandlersV"
  },
  "title" : "UICollectionViewDiffableDataSource.ReorderingHandlers"
}
-->

# UICollectionViewDiffableDataSource.ReorderingHandlers

Handlers for reordering items.

```
struct ReorderingHandlers
```

## Topics

### Reordering items

[`var canReorderItem: ((ItemIdentifierType) -> Bool)?`](/documentation/UIKit/UICollectionViewDiffableDataSource-9tqpa/ReorderingHandlers-swift.struct/canReorderItem)

The handler that determines whether you can reorder a particular item.

[`var willReorder: ((NSDiffableDataSourceTransaction<SectionIdentifierType, ItemIdentifierType>) -> Void)?`](/documentation/UIKit/UICollectionViewDiffableDataSource-9tqpa/ReorderingHandlers-swift.struct/willReorder)

The handler that prepares the diffable data source for reordering its items.

[`var didReorder: ((NSDiffableDataSourceTransaction<SectionIdentifierType, ItemIdentifierType>) -> Void)?`](/documentation/UIKit/UICollectionViewDiffableDataSource-9tqpa/ReorderingHandlers-swift.struct/didReorder)

The handler that processes a reordering transaction.

### Initializers

[`init()`](/documentation/UIKit/UICollectionViewDiffableDataSource-9tqpa/ReorderingHandlers-swift.struct/init())

Creates a reordering handlers structure.

---

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)