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

# snapshot()

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

## Declaration

```swift
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:completion:)](appkit/nscollectionviewdiffabledatasource-axww/apply(_:animatingdifferences:completion:).md)
