Subview frame is incorrect when creating UICollectionViewCell
The problem I created a UICollectionViewController with a custom UICollectionViewCell. The custom cell contains a large and rectangular UIView (named colorView) and a UILabel (named nameLabel). When the collection is first populated with its cells and I print colorView.frame, the printed frames have incorrect values. I know they are incorrect, because the colorView frames are larger than the cell frame themselves, even though the colorView gets drawn correctly. However, if I scroll the collectionView enough to trigger a reuse of a previously created cell, the colorView.frame now has correct