Created
January 4, 2013 18:18
-
-
Save rd13/4454684 to your computer and use it in GitHub Desktop.
Objective-C UICollectionViewCell Iteration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//cv = UICollectionView | |
for (int section = 0; section < [cv numberOfSections]; section++) { | |
for (int row = 0; row < [cv numberOfItemsInSection:section]; row++) { | |
NSIndexPath* cellPath = [NSIndexPath indexPathForRow:row inSection:section]; | |
//Cast to a custom cell: "GameCollectionViewCell" | |
GameCollectionViewCell *cell = (GameCollectionViewCell *) [cv cellForItemAtIndexPath:cellPath]; | |
NSLog(@"%i",cell.lbl.tag); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment