ios - Looping through all cells in UICollectionView -
i have uicollectionview , want add animation each cell.
currently i'm using
for(uicollectionview *cell in collectionview.visiblecells){ //add animation cell here } but applies animation visible cells , scroll down , cell no longer visible animation stops.
how loop through cells in uicollectionview?
i go in different way, probably. if want cells animate, set property shouldanimate = yes. in collectionview:cellforitematindexpath: check property , apply animation if needed (or remove it).
after setting property, reload visiblecells: [collectionview reloaditemsatindexpaths:collectionview.indexpathsforvisibleitems].
now, since animation provided when cell requested through datasource-protocol, animation when scroll.
Comments
Post a Comment