---
title: snapshot()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nscollectionviewdiffabledatasourcereference/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:)](appkit/nscollectionviewdiffabledatasourcereference/applysnapshot(_:animatingdifferences:).md)
