In my app, i have a table view and every row/cell has an imageView already on it. Each imageView already has its image assigned to it, each imageView’s .hidden property is set to YES until otherwise specified by the user. My question is: How can i test to see if any images are hidden/not hidden. If 1 cell has a visible image, i want to Call a method. And if all the images are gone i want to fire a different method, Any ideas?
I was trying something along the lines of:
if ([self.hand.showBadge boolValue] == YES) {
self.handView.hidden = YES;
}
else{
self.handView.hidden = NO;
}
But unfortunately it didnt work.
Thank you!
One way could be to tag the imageView w/in the cell and then use that tag to iterate over the cells as needed.
Within tableView:cellForRowAtIndexPath, add:
Alternatively, you could just set the tag for your image view in a prototype cell (or your static cells), if using storyboards.
Then, if you wanted to check the visible cells, insert the following code where you’d like to check the image views.