arrayWithObjects… is there a shortcut for using the same object “a” or any object?
NSMutableArray *kkk = [NSMutableArray arrayWithObjects: @"a", @"a", @"a", @"a", nil];
something like:
NSMutableArray *kkk = [NSMutableArray arrayWithObjects: [repeat: @"a", 4] , nil];
thanks
You could create a category method out of this, something like:
(Depending on your circumstances, you may want to create a copy of the object instead of adding the same object multiple times to the same array)
Then you could just do this: