Hi,
I've been searching the issues to see if my question has been previously asked, but I can't seem to find the one need answer for.
I'm developing a tvos app. So my layout is a vertical scroll consisting of horizontal collection view.
Basically similar to the apple Appstore layout.
I need to have an inset for the embedded collection view for the start and the end, which is 100,
and 10 spacing for items. See image below

How do I approach this?
I've tried setting the inset for the outer section (the one containing the embedded collectionview), but the scroll will be clipped by bounds. What I need is when scrolled, the items still scroll to the edges of the screen.
@ninokierulf idea off the top of my head:
IGListCollectionView, setcollectionView.contentInset = UIEdgeInsets(top: 0, left: 100, bottom: 0, right: 90)self.insets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 10)And that should give you 100 on the left/right with 10 in between. I assume you're using UICollectionViewFlowLayout?
Let us know if that helps!
It worked! Thanks
It's much simpler than thinking about indexes.
Love the drawing btw, super helpful 馃槃
I also need to set spacing between embedded horizontal cells, but it doesn't work for me using typical methods minimumInteritemSpacing. Why?
Is there something I maybe don't know?
@jonauz mind opening a separate issue for that? Some things that we also need to know:
@rnystrom sure, we can if needed.
Eventually I achieved wanted result using this solution.
Thought, still would be curious to understand why minimumInteritemSpacing do no effect on collection view layout.
My layout is exactly as in this picture.
Most helpful comment
@ninokierulf idea off the top of my head:
IGListCollectionView, setcollectionView.contentInset = UIEdgeInsets(top: 0, left: 100, bottom: 0, right: 90)self.insets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 10)And that should give you 100 on the left/right with 10 in between. I assume you're using
UICollectionViewFlowLayout?Let us know if that helps!