supplementaryViewProvider only getting called for first section

I have a UICollectionViewDiffableDataSource that has its supplementaryViewProvider property set to a closure that returns a header view for the cell.

The closure is only getting called for the first section of the collectionView regardless of the number of sections there are, each of which do contain cells.

I am using Xcode 13 beta 5.

Accepted Reply

My bad, after submitting the question I realized I had set the boundarySupplementaryItems property on the entire layout instead of on the sections...

Replies

My bad, after submitting the question I realized I had set the boundarySupplementaryItems property on the entire layout instead of on the sections...