UICollectionView: How to get the header view for a section?

前端 未结 4 1979
臣服心动
臣服心动 2021-01-31 09:15

There is a method to get a cell by indexPath (UICollectionView cellForItemAtIndexPath:). But I can\"t find a method to get one of the supplementary vie

4条回答
  •  礼貌的吻别
    2021-01-31 09:38

    This method is often enough to serve the purpose of reloading on-screen supplementary views:

    collectionView.visibleSupplementaryViews(ofKind: UICollectionElementKindSectionHeader)
    

提交回复
热议问题