CollectionView sizeForItemAtIndexPath never called

前端 未结 15 1461
一整个雨季
一整个雨季 2020-12-24 11:17

This is driving me crazy! I have a UICollectionViewController as shown below:

class PhrasesCompactCollectionViewController: UICollectionViewController
         


        
15条回答
  •  情深已故
    2020-12-24 12:05

    my problem was that I had my UICollectionViewDataSource object created as local variable. So if you initialize your dataSource object manually in code, make sure to store it as global variable.

提交回复
热议问题