UICollectionView inside TableViewCell not called

后端 未结 3 2057
轻奢々
轻奢々 2020-12-11 12:12

I have a UITableView contains one horizontal scroll UICollectionView in every cell like this

override func tableView(_ tableView: UITableView, cellForRowAt i         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 12:18

    This happens because your collection view instances are reused with cells. Only 4 instances are being created and reused.

    You can write your collectionview logic in your custom tableview cell and make custom cell as delegate and datasource of collectionview.

提交回复
热议问题