Looked around for a while and couldn't find an answer to this, but it seems like a pretty simple thing. I want to create an NSArray that has room for 100 objects (Doors) and then just loop through to create a new door for each index in the array. I couldn't find a way to do this without manually writing the code for 100 new doors when I init the NSArray. I know I could do this by just creating an NSMutableArray and using addObject but I've heard NSArrays are much faster and I'd like to know how to do this for future reference.
Here's what I'm basically trying to do:
NSArray *doors = [[NSArray alloc]init]; //with size 100?
for (int i = 0; i < [doors count]; i++)
[[doors objectAtIndex:i] = [[Door alloc]init]];