---
title: snapshot()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nstableviewdiffabledatasourcereference/snapshot()
---

# snapshot()

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

## Declaration

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

## Return Value

Return Value A snapshot that contains row and item identifiers in the order they appear in the UI.

## See Also

### Updating Data

- [applySnapshot(_:animatingDifferences:)](appkit/nstableviewdiffabledatasourcereference/applysnapshot(_:animatingdifferences:).md)
- [applySnapshot(_:animatingDifferences:completion:)](appkit/nstableviewdiffabledatasourcereference/applysnapshot(_:animatingdifferences:completion:).md)
- [defaultRowAnimation](appkit/nstableviewdiffabledatasourcereference/defaultrowanimation.md)
