Here's a fairly basic question about current iOS development, to which I've never found a good answer.
In a (say) vertical UICollectionView
,
Is it possible to have full-width cells, but, allow the dynamic height to be controlled by autolayout?
(If you're new to iOS "dynamic height", meaning the cell has a few, say, text views which could be any length or images which could be different sizes, so ultimately each cell is a totally different height.)
If so how?
This strikes me as perhaps the "most important question in iOS with no really good answer."
From iOS 10, we've got new API on flow layout to do that.
All you have to do is set your
flowLayout.estimatedItemSize
to a new constant,UICollectionViewFlowLayoutAutomaticSize
.Source: http://asciiwwdc.com/2016/sessions/219