I would like the UICollectionView (The red one) to shrink to the height of the content size in this case UICollectionViewCells(the yellow ones) because there is a lot of emp
You have to set height constraint as equal to content size
HeightConstraint.constant = collection.contentSize.height