简体   繁体   中英

How to show Header without show Cell in CollectionView iOS Swift 4?

I have collection view with Cell , Header and Footer . some of indexes in my datasource not have object that contains cell data, Therefore I want to not show cell for that indexes.
I tried to set return nil in cellForItemAt but it's not possible.
Help me to fix this.

collectionView(_:numberOfItemsInSection:)返回0

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