objective c - get all UICollectionViewCell -
i'd access uicollectionviewcell in uicollectionview. in next code, log outputs null. collectioncell subclass of uicollectionviewcell, , titlelabel property. have thought access collectioncell?
for (nsinteger j = 0; j < [collectionview numberofsections]; j++) { (nsinteger = 0; < [collectionview numberofitemsinsection:j]; i++) { collectioncell* cell = [collectionview cellforitematindexpath:[nsindexpath indexpathforitem:i insection:j]]; nslog(@"%@", cell.titlelabel.text); } }
cellforitematindexpath returns uicollectionviewcell visible cells.
one way phone call datasource method
collectionview:cellforitematindexpath: but remember: cells reused, don't unique cells
objective-c uicollectionview uicollectionviewcell
No comments:
Post a Comment