I want to perform the same action over several objects stored in a NSSet
.
My first attempt was using a fast enumeration:
for (id item in myS
I would not use makeObjectsPerformSelector for the simple reason that it is the kind of call that you don't see all that often. Here is why for example - I need to add debugging code as the array is enumerated, and you really can't do that with makeObjectsPerformSelector unless you change how the code works in Release mode which is a real no no.
for (id item in mySetOfObjects)
{
#if MY_DEBUG_BUILD
if ([item isAllMessedUp])
NSLog(@"we found that wily bug that has been haunting us");
#endif
[item action];
}
--Tom