SectionIndexTitles for a UICollectionView

后端 未结 4 2127
醉话见心
醉话见心 2020-12-08 01:35

So I implemented a proper TableView with a search functionality and sectionIndexTitles. Now, I am trying to implement a UICollectionView

4条回答
  •  不思量自难忘°
    2020-12-08 02:04

    You can provide this header by implementing and returning a value for the following function for UICollectionViewDataSource

    collectionView:viewForSupplementaryElementOfKind:atIndexPath:
    

    Note that the size of the header will be from the height value of the CGRect returned from UICollectionViewFlowLayoutDelegate method collectionView:layout:referenceSizeForHeaderInSection:

提交回复
热议问题