I'm finding friction when trying to create responsive / adaptive UICollectionViewCells
in the UIStoryboard
.
The issue I'm seeing is that you don't seem to be able to set the Cell Size
per Size Class
and I'm trying to ascertain the right approach to this. I've designed the cells to adjust to their containers, so that they should autosize regardless of size class. This mostly works in that if I change the size class, select my cell view and do Update Frames
then they all resize to fit their new size. However it's a one shot deal, if I go back to the Any/Any size class then I'm still seeing that resized version.
Here's what I'm aware I could try:
UICollectionViews
I'm hoping this is a solved scenario and I'm just missing something, but I'm aware that it could be that the IB tools don't match the code at this point.
The solution I came up with was just to implement the UICollectionViewDelegateFlowLayout
and implement the sizeForItemAtIndexPath
method.
This means that the cell dimensions can be set to match the available Size Class
dimensions.
This still isn't ideal as you can't see the changes in the storyboard and you can't create a universal design and see it in each of the different formats.
I'm still hoping someone has a better option.