---
title: UICollectionViewDiffableDataSource.SupplementaryViewProvider
framework: uikit
role: symbol
role_heading: Type Alias
path: uikit/uicollectionviewdiffabledatasource-9tqpa/supplementaryviewprovider-swift.typealias
---

# UICollectionViewDiffableDataSource.SupplementaryViewProvider

A closure that configures and returns a collection view’s supplementary view, such as a header or footer, from a diffable data source.

## Declaration

```swift
typealias SupplementaryViewProvider = (UICollectionView, String, IndexPath) -> UICollectionReusableView?
```

## Parameters

- `collectionView`: The collection view to configure this supplementary view for.
- `kind`: The kind of supplementary view to provide. The layout object that supports the supplementary view defines the value of this string.
- `indexPath`: The index path that specifies the location of the supplementary view in the collection view.

## Return Value

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

## See Also

### Creating supplementary views

- [supplementaryViewProvider](uikit/uicollectionviewdiffabledatasource-9tqpa/supplementaryviewprovider-swift.property.md)
