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

# snapshot()

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

## Declaration

```swift
func snapshot() -> NSDiffableDataSourceSnapshot<SectionIdentifierType, ItemIdentifierType>
```

## Return Value

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

## See Also

### Updating Data

- [apply(_:animatingDifferences:completion:)](appkit/nstableviewdiffabledatasource-c5gl/apply(_:animatingdifferences:completion:).md)
- [defaultRowAnimation](appkit/nstableviewdiffabledatasource-c5gl/defaultrowanimation.md)
