Reputation: 7215
I'm trying to implement a UICollectionView
that's grid-based, so that it looks something like this where every box is either a square or a rectangle. The number of items per row and the dimensions of each cell would differ based on screen size (i.e. iPhone 4, 5S, 6, iPad, etc.). This can be done using JavaScript: http://packery.metafizzy.co/ but I'd like to figure out how to do it using Swift. This would only need to work with iOS 8+ so I'm not sure if the native UICollectionView
can do this already. Should I be implementing UICollectionViewFlowLayout
?
Upvotes: 2
Views: 1253