I have an array of NSNumbers which I would like to use to change the image of a UICollectionView
cell if each of those numbers is equal to the indexPath
row of the collectionView
.
I'm aware that I can use:
if [indexPath row] == 5 {
self.myImage = [UIImage imageNamed:@"120-red.png"];
aCell.imageView.image = self.myImage;
}
for a single value, but how do I do this from an array?
btw. its a dynamic NSMutableArray
which is created from purchased products and stored in NSUserDefaults
. Any help is much appreciated!