[英]How to show Header without show Cell in CollectionView iOS Swift 4?
I have collection view with Cell , Header and Footer . 我具有Cell , Header和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. 我试图在cellForItemAt中设置
return nil
,但这是不可能的。
Help me to fix this. 帮我解决这个问题。
在collectionView(_:numberOfItemsInSection:)
返回0
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.