title: How do I get an image array animation to cycle through only one loop in Xcode?
body: <p>I have an image array animation, however it is a continuous loop. How do I get it to cycle through only one loop and stop on the last frame?</p>
  
  <pre><code>- (void) balloonAnimation
  {
      NSMutableArray *balloonAnimationImages = [NSMutableArray arrayWithCapacity:27];
  
     for (NSInteger i = 0; i &lt; 27; i++) {
         NSString *nameOfImage = [NSString stringWithFormat:@"balloons%d.png", i+1];
         UIImage *image = [UIImage imageNamed:nameOfImage];
         [balloonAnimationImages addObject:image];       
      }
  
      //animate here
      self.imgBalloon.animationImages = balloonAnimationImages;
      self.imgBalloon.animationDuration = 5.0f;
      [self.imgBalloon startAnimating];    
  }
  </code></pre>