---
title: "snapshot(forSection:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionviewdiffabledatasourcereference/snapshot(forsection:)"
---

# snapshot(forSection:)

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

## Declaration

```swift
func snapshot(forSection section: Any) -> NSDiffableDataSourceSectionSnapshotReference
```

## See Also

### Updating section data

- [applySnapshot(_:toSection:animatingDifferences:completion:)](uikit/uicollectionviewdiffabledatasourcereference/applysnapshot(_:tosection:animatingdifferences:completion:).md)
- [applySnapshot(_:toSection:animatingDifferences:)](uikit/uicollectionviewdiffabledatasourcereference/applysnapshot(_:tosection:animatingdifferences:).md)
