I have an NSArray of Foos in an Objective-C program. I would like to call the doIt function of each Foo, however, the makeObjectsPerformSelector function of NSArray does not allow the original Foos to be modified, per the docs. The doIt selector changes the m data member for each Foo when doIt is called. How do I go about efficiently performing this function on each Foo in the NSArray?
@interface Foo : NSObject {
NSString *m;
}
@property (nonatomic, retain) NSString *m;
-(void)doIt;
@end