---
title: "snapshot(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionviewdiffabledatasource-9tqpa/snapshot(for:)"
---

# snapshot(for:)

Returns a representation of the current state of the data in the specified section of the collection view.

## Declaration

```swift
@MainActor @preconcurrency func snapshot(for section: SectionIdentifierType) -> NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>
```

## See Also

### Updating section data

- [apply(_:to:animatingDifferences:completion:)](uikit/uicollectionviewdiffabledatasource-9tqpa/apply(_:to:animatingdifferences:completion:).md)
- [apply(_:to:animatingDifferences:)](uikit/uicollectionviewdiffabledatasource-9tqpa/apply(_:to:animatingdifferences:).md)
