How to change background color of a whole section in UICollectionView?
问题 In UICollectionView, I want to give the whole section a uniform background color, instead of for a single cell or for the whole collection view. I don't see any delegate method to do that, any suggestions? 回答1: The idea is to override UICollectionViewLayoutAttributes to add a color attribute. And then override UICollectionReusableView apply the color to the view background. https://github.com/strawberrycode/SCSectionBackground 回答2: This is a great tutorial for changing UICollectionView