title: How can I fill an NSArray dynamically?
body: <p>I have a <code>for</code> loop. Inside that loop I want to fill up an <code>NSArray</code> with some objects. But I don't see any method that would let me do that. I know in advance how many objects there are. I want to avoid an <code>NSMutableArray</code>, since some people told me that's a very big overhead and performance-brake compared to <code>NSArray</code>.</p>
  
  <p>I've got something like this:</p>
  
  <pre><code>NSArray *returnArray = [[NSArray alloc] init];
  for (imageName in imageArray) {
      UIImage *image = [UIImage imageNamed:imageName];
      //Now, here I'd like to add that image to the array...
  }
  </code></pre>
  
  <p>I looked in the documentation for <code>NSArray</code>, but how do I specify how many elements are going to be in there? Or must I really use <code>NSMutableArray</code> for that?</p>