ios - Proper way to reuse UITableViewCell containing UICollectionView -


i have uitableview. each cell contains horizontal collection view. when scroll table, collection view contains cells. guess because cells not reused. in illustration, grey cells not suppose there. table view

what proper code should put in reusecell? tried following made app crash

over

ride func prepareforreuse()     {         super.prepareforreuse()         channelscollectionview = uicollectionview()     } 

it should

//reset datasource channelscollectionview.datasourcearray = []()  //reload data of collectionview channelscollectionview.reloaddata() 

again depends, 1 way of doing


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -