---
title: UICollectionViewDiffableDataSourceReferenceCellProvider
framework: uikit
role: symbol
role_heading: Type Alias
path: uikit/uicollectionviewdiffabledatasourcereferencecellprovider
---

# UICollectionViewDiffableDataSourceReferenceCellProvider

A closure that configures and returns a cell for a collection view from its diffable data source.

## Declaration

```swift
typealias UICollectionViewDiffableDataSourceReferenceCellProvider = (UICollectionView, IndexPath, Any) -> UICollectionViewCell?
```

## Parameters

- `collectionView`: The collection view to configure this cell for.
- `indexPath`: The index path that specifies the location of the cell in the collection view.
- `identifier`: The identifier of the item for this cell.

## Return Value

Return Value A non-nil configured cell object. The cell provider must return a valid cell object to the collection view.

## See Also

### Creating a diffable data source

- [init(collectionView:cellProvider:)](uikit/uicollectionviewdiffabledatasourcereference/init(collectionview:cellprovider:).md)
