|
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 Take the pain out of configuring and testing your paywalls. RevenueCat's all new Paywall Editor allow you to remotely configure your paywall view without any code changes or app updates.
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.