I have a UIView that gets loaded with several custom NSObjects (graphShape). Each graphShape object has a property called shapeName. I can access this property like this:
graphShape * myNewShape = [doShapes objectAtIndex:i];
NSLog(@"myNewShape Name: %@", myNewShape.shapeName);
//Logs: myNewShape Name: redshape
The NSArray (doShapes) contains a list of some shapeNames that the View contains (ie: 'redshape', and 'yellowshape') and I need to change another property of the matched object How do I loop through all of the instances of the graphShape object in my view and find the ones that have the property 'redshape' and 'yellowshape'?
Are you looking for that:
Another approach to obtain a subset of objects that match your criteria using blocks:
You can then iterate over the objects in setOfRedViews...