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

# snapshot()

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

## Declaration

```swift
func snapshot() -> NSDiffableDataSourceSnapshotReference
```

## Return Value

Return Value A snapshot containing section and item identifiers in the order that they appear in the UI.

## See Also

### Updating data

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