<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewDiffableDataSourceSectionSnapshotHandlers",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionViewDiffableDataSourceSectionSnapshotHandlers"
  },
  "title" : "UICollectionViewDiffableDataSourceSectionSnapshotHandlers"
}
-->

# UICollectionViewDiffableDataSourceSectionSnapshotHandlers

Handlers for expanding and collapsing items.

```
@interface UICollectionViewDiffableDataSourceSectionSnapshotHandlers : NSObject
```

## Topics

### Expanding and collapsing items

[`shouldCollapseItemHandler`](/documentation/UIKit/UICollectionViewDiffableDataSourceSectionSnapshotHandlers/shouldCollapseItemHandler)

The handler that determines whether a particular item is collapsable.

[`shouldExpandItemHandler`](/documentation/UIKit/UICollectionViewDiffableDataSourceSectionSnapshotHandlers/shouldExpandItemHandler)

The handler that determines whether a particular item is expandable.

[`willCollapseItemHandler`](/documentation/UIKit/UICollectionViewDiffableDataSourceSectionSnapshotHandlers/willCollapseItemHandler)

The handler that prepares the diffable data source for collapsing an item.

[`willExpandItemHandler`](/documentation/UIKit/UICollectionViewDiffableDataSourceSectionSnapshotHandlers/willExpandItemHandler)

The handler that prepares the diffable data source for expanding an item.

[`snapshotForExpandingParentItemHandler`](/documentation/UIKit/UICollectionViewDiffableDataSourceSectionSnapshotHandlers/snapshotForExpandingParentItemHandler)

The handler that provides the section snapshot for expanding the parent item.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`NSCopying`](/documentation/Foundation/NSCopying)

---

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)