I'm looking for a layout or a subclass of flowLayout that uses every single available space instead of cell wrapping and going to the next line, something like this:
Where the smallest cell is like cell number 4 (more like a unit) and cell 1 is about four times the size of cell number 4. Cell number 2 is the size of two merged cell number 4 and so on. Does anyone know a github example or tutorial/demo that could help me achieve this. I was using https://github.com/chiahsien/UICollectionViewWaterfallLayout but the number of columns must be the same in each line. Also I want to change this layout to a "4 unit" wide in landscape (some cells will have to be reordered in the dataSource, but that's no problem) and change back to a "3 unit" wide on portrait. I want to use this in several different views and the order of the and number of "big" and "small" cell may vary but they are always sorted to fit perfectly in the view like this example. Also it needs to be a collection view because then the user can scroll "infinitely" and this will load more cells (but this time only small cells). So any cell after cell number 11 will be the same size. The sizes of cells will be stored in a nsarray containing cell info like its CGsize, so the only thing this layout has to do is to place the cells in the correct places
You want to use something like this:
I downloaded this project and it does almost exactly what you want. All you need to do to adapt it is figure out the correct cell size multiples instead of using their random numbers.