UICollectionView

  1. 如何修改装饰视图的背景色?(或者其他属性、新增子视图等等)
    a. 继承UICollectionViewLayoutAttributes自定义一个attributes
    b. 使用自定义的重写UICollectionReusableView的apply函数
    c. 重写UICollectionViewFlowLayout的func layoutAttributesForDecorationView(ofKind elementKind: String, at indexPath: IndexPath)函数,返回自定义的attributes

2.

Contents
,