-
Notifications
You must be signed in to change notification settings - Fork 23
Description
I would like to use this class to implement a game that always displays 12 cells in a grid with 4 rows and 3 columns. I want the aspect ratio of each cell to be 2x3. The collection view's frame is fixed and its dimensions will depend on the device. (I’m assuming that the base class UICollectionViewLayout can figure out the correct size of the collection view’s frame regardless of the device.)
I don’t think the standard flow layout can do this. In order to accomplish what I want, the class will need to adjust the margins (section insets) and the item spacing (distance between cells) to fit the grid inside the frame and make it look regular. In other words, the item spacing and insets should all be the same distance in points.
I plan to spend some time working on this packing problem. If I can find a solution, I’ll go ahead and submit a pull request. Suggestions welcome!