简体   繁体   中英

How to add uicollectionview inside uicollectionview header

I need to know how I add a collectionview within the header of the collectionview 'father', I have tried it in several ways but it does not work for me.

something like the following image:

这个

您可以使用一个单独的xib文件来实现此目的,该文件将代表您的标头,而不是在其中添加新的collectionView

Go through below steps:-

  • Take two nib one for normal cell and one for header cell.
  • In Header cell take collection view
  • Decide which nib you have to load in cellForRow method using boolean flag or something else.

You need to define your own logic.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM