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.

Answered by hotngui in 687115022

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

Accepted Answer

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

supplementaryViewProvider only getting called for first section
 
 
Q