I am creating a chess board and want to use UICollectionView to do the grid layout. The problem is, I don't know how to set the number of columns to always be 8, so as to create a 8x8 grid.
I understand that UICollectionViewDelegateFlowLayout
can be implemented to control the size of the items, but my question is will it work across all iOS devices (iPhone 4s - iPhone 6+, iPads). From what I have seen, it looks like i need to handle the size of the cells individually by each device type.
UICollectionView Set number of columns
Is anyone aware of a better solution to the problem?