I am building UICollectionView that needs to scroll vertically, but lay out its items in a columnar format in order to handle varying item heights, like this:
A column-by-column layout is the default for a horizontally-scrolling collection view, but mine needs to scroll vertically. What's the easiest way to accomplish this? Do I need to subclass UICollectionViewLayout, or can UICollectionViewFlowLayout do it? Or...?
It turns out there is a subclass of UICollectionViewLayout called SelfSizingWaterfallCollectionViewLayout on GitHub that does exactly what I needed.