Search code examples
iosswiftuicollectionviewuicollectionviewcell

How do I add a static CollectionView cell after my dynamic CollectionView cells? (Swift)


Hey I'm trying to add a static collection view cell after my dynamic collection view cells. For example in my screenshot, under the "Study Grind Edition" collectionview, Philz Coffee is the first cell but I hope to add another cell next to it that is static that would say "Rate more cafes for more selection!" or something along those lines. Likewise, in the "Thanks a Brunch" section, if there is no Cafe cell, it would only display the "Rate more cafes for more selection!" cell as the first cell. Would I add a second section for that? Thank you so much!

enter image description here


Solution

  • What you can do is create another cellClass (or Another cell in you storyboard) and just add it programmaticaly in your collectionView after the last element.

    Regards