I have a storyboard with UICollectionViewController
with cell prototypes. The cell size is not specified directly and it causes random UI bugs like stretching cell animation. I want to set the size directly but I didn't found how to do that in xcode 10 (and the latest swift). How to solve this issue?
Note: I know about UICollectionViewDelegateFlowLayout existance but I don't know how to apply it to UICollectionViewController
.
If you use
UICollectionViewFlowLayout
:Make your
UICollectionViewController
orUIViewController
that containsUICollectionView
instance to adoptUICollectionViewDelegateFlowLayout
{ ... }
Implement the method below: