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.
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
Post a Comment