UICollectionView's cellForItemAtIndexPath is not being called

后端 未结 30 2501
再見小時候
再見小時候 2020-12-07 11:11

Only my second time using UICollectionView\'s and perhaps I have bitten off more than I can chew but nevertheless:

I am implementing a UICollectionView (myCollection

30条回答
  •  情书的邮戳
    2020-12-07 11:53

    In my case I had to adjust the estimated Content size. content size did not do it.

      let layout = collectionVC.collectionView.collectionViewLayout as! UICollectionViewFlowLayout
        layout.itemSize = CGSize(width: 100, height: 100)
        layout.estimatedItemSize = CGSize(width: 100, height: 100)
    

提交回复
热议问题