I have 39 different UIButton variables in my .h file, but I would like to add each of them to an array without having to type out the same thing 39 times.
Is there a
Like so:
NSMutableArray *arr = [NSMutableArray array]; for(int i = 1; i <= 39; ++i) { [arr addObject:[self valueForKey:[NSString stringWithFormat:@"btn%d", i]]]; }