---
title: "replaceChildren(ofParentItem:with:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nsdiffabledatasourcesectionsnapshotreference/replacechildren(ofparentitem:with:)"
---

# replaceChildren(ofParentItem:with:)

Replaces all child items of the specified parent item with the provided section snapshot.

## Declaration

```swift
func replaceChildren(ofParentItem parentItem: Any, with snapshot: NSDiffableDataSourceSectionSnapshotReference)
```
