title: UIImageView animation after action?
body: <p>I have a problem setting up an animation. The first imageview starts animating and when playsound1 is called then starts the second animation. Everything works fine but right now when the second animation stops there is no animation going on. So what I want to do is after the second animation stops  - the first to start all over-- then again when method is called to play the second animation . Any hints?</p>
  
  <p>Here you can see  a part of the code as it is right now:</p>
  
  <pre><code>- (void)loadtest1 {
      NSArray *imageArray = [[NSArray alloc] initWithObjects:
                             [UIImage imageNamed:@"test1.png"],
                             [UIImage imageNamed:@"test2.png"],
                             [UIImage imageNamed:@"test3.png"],
                             [UIImage imageNamed:@"test4.png"],
                             nil];
  
      test1.animationImages = imageArray;
      test1.animationRepeatCount = 0;
      test1.animationDuration = 1;
  
      [imageArray release];
      [test1 startAnimating];
  }
  
  - (void)loadtest2 {
      NSArray *imageArray = [[NSArray alloc] initWithObjects:
                             [UIImage imageNamed:@"test4.png"],
                             [UIImage imageNamed:@"test5.png"],
                             [UIImage imageNamed:@"test6.png"],
                             [UIImage imageNamed:@"test7.png"],
                             nil];
  
      test2.animationImages = imageArray;
      test2.animationRepeatCount = -1;
      test2.animationDuration = 1;
  
      [imageArray release];
      [test2 startAnimating];
  }
  
  - (IBAction)playsound1 {
      NSString *path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"mp3"];
      AVAudioPlayer* theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
      theAudio.delegate = self;
      [theAudio play];
      test1.hidden = 0;
      test2.hidden = 1;
      [test1 startAnimating];
      test2.center = test1.center;
  }
  </code></pre>