I am using UICollectionViewDelegateFlowLayout to display cells of dynamic height in my Collection View. The size of the cells are set in sizeForItemAt.
Goal: Each Collection View cell has a toggle function that should change the dynamically-calculated height to 50%. This is where I am running into problems.
In sizeForItemAt I am getting the dynamic height.
var dynamicHeight = (header + content + footer)
return CGSize(width: self.view.frame.width, height: dynamicHeight)
I'd like to update sizeForItemAt to something like the following, when a button on the cell gets pressed:
return CGSize(width: self.view.frame.width, height: (dynamicHeight / 2))
How do I change the height of a Collection View Cell while updating sizeForItemAt?
