---
title: "apply(_:to:animatingDifferences:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionviewdiffabledatasource-9tqpa/apply(_:to:animatingdifferences:)"
---

# apply(_:to:animatingDifferences:)

Updates the section UI to reflect the state of the data in the specified snapshot, optionally animating the UI changes.

## Declaration

```swift
@MainActor @preconcurrency func apply(_ snapshot: NSDiffableDataSourceSectionSnapshot<ItemIdentifierType>, to section: SectionIdentifierType, animatingDifferences: Bool = true) async
```

## See Also

### Updating section data

- [snapshot(for:)](uikit/uicollectionviewdiffabledatasource-9tqpa/snapshot(for:).md)
- [apply(_:to:animatingDifferences:completion:)](uikit/uicollectionviewdiffabledatasource-9tqpa/apply(_:to:animatingdifferences:completion:).md)
