reza_khalafi
reza_khalafi

Reputation: 6544

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.

Upvotes: 2

Views: 691

Answers (1)

reza_khalafi
reza_khalafi

Reputation: 6544

Return 0 in collectionView(_:numberOfItemsInSection:).

Upvotes: 3

Related Questions