|
No Storyboard! I have a collectionView with a diffeable datasource. Only one section. I want to display a header, so I registered a custom cell class:
I create a flow Layout as such:
The datasource looks as follows:
But how and where do I add the header? The 'old way' doesn't work:
I'm stumped! |
|
Maybe you are missing the height for that Header?
|
|
If you haven't already watched my video on this stuff, you might want to consider doing so: https://www.youtube.com/watch?v=SR7DtcT61tA |
|
|
|
Using the SectionHeader class from Paul's video mentioned above I came up with this conversion for your code example. Would this work for you?
|
|
SPONSORED Get accurate app localizations in minutes using AI. Choose your languages & receive translations for 40+ markets!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.