title: How to efficiently show many Images? (iPhone programming)
body: <p>In my application I needed something like a particle system so I did the following:</p>
  
  <p>While the application initializes I load a UIImage</p>
  
  <pre><code>laserImage = [UIImage imageNamed:@"laser.png"];
  </code></pre>
  
  <p>UIImage *laserImage is declared in the Interface of my Controller. Now every time I need a new particle this code makes one:</p>
  
  <pre><code>// add new Laserimage
  UIImageView *newLaser = [[UIImageView alloc] initWithImage:laserImage];
  [newLaser setTag:[model.lasers count]-9];
  [newLaser setBounds:CGRectMake(0, 0, 17, 1)];
  [newLaser setOpaque:YES];
  [self.view addSubview:newLaser];
  [newLaser release];
  </code></pre>
  
  <p>Please notice that the images are only 17px * 1px small and model.lasers is a internal array to do all the calculating seperated from graphical output. So in my main drawing loop I set all the UIImageView's positions to the calculated positions in my model.lasers array:</p>
  
  <pre><code>for (int i = 0; i &lt; [model.lasers count]; i++) {
      [[self.view viewWithTag:i+10] setCenter:[[model.lasers objectAtIndex:i] pos]];
  }
  </code></pre>
  
  <p>I incremented the tags by 10 because the default is 0 and I don't want to move all the views with the default tag.</p>
  
  <p>So the animation looks fine with about 10 - 20 images but really gets slow when working with about 60 images. So my question is: Is there any way to optimize this without starting over in OpenGl ES?</p>