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