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 - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

ios - How to Rectify the Relationship Fault in CoreData While parsing RESTKIT? -