I have a added a UICollectionView to my UIViewController and have made a custom cell for it.
I set the size of the cell using the siz
For those using Storyboard + AutoLayout, and choosing which constraints are active at runtime:
When using dequeueReusableCell, on first load, the cell is created but its view has not been initialised, so the constraint changes aren't saved - whatever you have set in Storyboard is used. Solution for me was to update the constraints after the view has loaded:
override func layoutSubviews() {
super.layoutSubviews()
adjustIconWidths()
}