Header workaround
klabusta opened this issue ยท 7 comments
Great pod, thanks! Do you plan to implement headers/footers anytime soon? Do you have a workaround solution for a header until this is implemented?
I'm stuck here. Thanks!
Hi @klabusta, I'm planning to add this support but I can not really plan how soon at the moment. I would be really happy if you submit a PR with this feature ๐
As a workaround there is one solution come to my mind: create a cell which looks like header or footer.
Hi @Antondomashnev, I was considering that as a workaround. Only problem I see, is that my header needs a flexible height. With a fixed rowHeight for my mozaic layout, this doesn't seem easily possible. Or can I change the rowHeight just for one 'row'?
can I change the rowHeight just for one 'row'?
@klabusta, unfortunately nope, but there is a crazy workaround for this.
Imagine you have a height of the smallest cell is 44 points and height of header is 22 points,
you can set the row height for 22 points, which will make a header be possible and the smallest cell becomes the cell of height of two row heights.
Let me know if the proposed workaround is understandable ๐
Too bad this won't work. The header has a dynamic height, so I can't even guarantee it to be a multiple of rowHeight. I've forked and added top spacing. Which is really hacky, but will serve well until headers are possible. https://github.com/klabusta/ADMozaicCollectionViewLayout/blob/96b21ec48d4eda129dbe6db3d5fa1fe01ffbcbd4/ADMozaikCollectionViewLayout/Private/ADMozaikLayoutGeometry.swift
I will really try to find time soon to think about better way to handle it ๐
Awesome. Thanks