I am trying to create a horizontal list of images with the same size (red tiles), and the last item should be a "view all" cell with a different width (purple tile):
I've been struggling to implement this using UICollectionViewCompositionalLayout
, I can't find the right combination of groups and items.
Would it make sense to create a group with a number of items equal to the images in my datasrouce?
let group = NSCollectionLayoutGroup.horizontal(layoutSize: size, subitem: item, count: data[section].count)
and then add one last group for the purple tile?
let group = NSCollectionLayoutGroup.horizontal(layoutSize: purpleSize, subitems: [purpleItem])
and even if this the case, how would I combine these two together?
You don't have to provide any code samples, just describing the setup of nested groups would be enough! Thanks in advance!