---
title: snapshot()
framework: uikit
role: symbol
role_heading: Instance Method
path: uikit/uitableviewdiffabledatasource-2euir/snapshot()
---

# snapshot()

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

## Declaration

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

## Return Value

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

## See Also

### Updating data

- [apply(_:animatingDifferences:)](uikit/uitableviewdiffabledatasource-2euir/apply(_:animatingdifferences:).md)
- [apply(_:animatingDifferences:completion:)](uikit/uitableviewdiffabledatasource-2euir/apply(_:animatingdifferences:completion:).md)
- [applySnapshotUsingReloadData(_:)](uikit/uitableviewdiffabledatasource-2euir/applysnapshotusingreloaddata(_:).md)
- [applySnapshotUsingReloadData(_:completion:)](uikit/uitableviewdiffabledatasource-2euir/applysnapshotusingreloaddata(_:completion:).md)
- [defaultRowAnimation](uikit/uitableviewdiffabledatasource-2euir/defaultrowanimation.md)
