|
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 Transform your career with the iOS Lead Essentials. This Black Friday, unlock over 40 hours of expert training, mentorship, and community support to secure your place among the best devs. Click for early access to this limited offer and a free crash course.
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.