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

# NSDiffableDataSourceTransaction

A transaction that describes the changes after reordering the items in the view.

```
@preconcurrency struct NSDiffableDataSourceTransaction<SectionIdentifierType, ItemIdentifierType> where SectionIdentifierType : Hashable, SectionIdentifierType : Sendable, ItemIdentifierType : Hashable, ItemIdentifierType : Sendable
```

## Topics

### Accessing a transaction’s information

[`var sectionTransactions: [NSDiffableDataSourceSectionTransaction<SectionIdentifierType, ItemIdentifierType>]`](/documentation/UIKit/NSDiffableDataSourceTransaction-swift.struct/sectionTransactions)

An array of section transactions for the transaction.

[`var initialSnapshot: NSDiffableDataSourceSnapshot<SectionIdentifierType, ItemIdentifierType>`](/documentation/UIKit/NSDiffableDataSourceTransaction-swift.struct/initialSnapshot)

The snapshot before the transaction occured.

[`var finalSnapshot: NSDiffableDataSourceSnapshot<SectionIdentifierType, ItemIdentifierType>`](/documentation/UIKit/NSDiffableDataSourceTransaction-swift.struct/finalSnapshot)

The snapshot after the transaction occured.

[`var difference: CollectionDifference<ItemIdentifierType>`](/documentation/UIKit/NSDiffableDataSourceTransaction-swift.struct/difference)

A collection of insertions and removals that describe the difference between initial and final snapshots.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)