This is driving me crazy! I have a UICollectionViewController as shown below:
class PhrasesCompactCollectionViewController: UICollectionViewController
Swift 5
All these steps are required :
UICollectionViewDelegate, UICollectionViewDataSource
collectionView.delegate = self
and collectionView.dataSource = self
as :
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
{
return CGSize(width: 100, height:100)
}