ios - How to change UICollectionViewCell selection of a non-visible cell? -


is there way change 'selected' member of uicollectionviewcell not in "visiblecells"? (beside saving cell object of last selected cell...)

in order change selected status of item should call method selectitematindexpath: items can reused, if call setselected method of uicollectionviewcell, might not select right item.

[self.collectionview selectitematindexpath:indexpath animated:no scrollposition:uicollectionviewscrollpositionnone]; 

if want deselect have method:

[self.collectionview deselectitematindexpath:indexpath animated:no]; 

Comments