CollectionViewShelfLayout
CollectionViewShelfLayout copied to clipboard
Add disclose indicator
Hi, Can we add disclose indicator for a section like tableView cell?
Yes, you can. By having a custom subclass for the Header view for each section
But the header is on top. Can I put it to the right like this?
What are those square? Are they a UICollectionViewCell?
Yes. Those are cells of that section.
I think in this case, you can have a disclosure indicator a UICollectionViewCell with another cell type with its own cell identifier and return it from the cellForItem method.
That will make it scrollable. I want it to stay at the right.

I see. I'm afraid that this library doesn't support this scenario out of the box but you can fork this project and make a change to make it support your scenario
Thank you for your work. Do you have any suggestion for that?
You can add a new kind of supplementary view for the detail disclosure (and may also with a custom Layout Attribute) and layout it in prepareLayout method similar to https://github.com/pitiphong-p/CollectionViewShelfLayout/blob/master/CollectionViewShelfLayout/CollectionViewShelfLayout.swift#L178-L186 and also return in the layoutAttributesForElements(in:) and layoutAttributesForSupplementaryView(ofKind:at:) methods
Or if you set the deployment target at iOS 13 then you may try the new https://developer.apple.com/documentation/uikit/uicollectionviewcompositionallayout as presented in https://developer.apple.com/videos/play/wwdc2019/215/