title: Access Method After UIImageView Animation Finish
body: <p>I have an array of images loaded into a UIImageView that I am animating through one cycle. After the images have been displayed, I would like a <code>@selector</code> to be called in order to dismiss the current view controller. The images are animated fine with this code:</p>
  
  <pre><code>NSArray * imageArray = [[NSArray alloc] initWithObjects:
                          [UIImage imageNamed:@"HowTo1.png"], 
                          [UIImage imageNamed:@"HowTo2.png"],
                          nil];
  UIImageView * instructions = [[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  
  instructions.animationImages = imageArray;
  [imageArray release];
  instructions.animationDuration = 16.0;
  instructions.animationRepeatCount = 1;
  instructions.contentMode = UIViewContentModeBottomLeft;
  [instructions startAnimating];
  [self.view addSubview:instructions];
  [instructions release];
  </code></pre>
  
  <p>After the 16 seconds, I would like a method to be called. I looked into the <code>UIView</code> class method <code>setAnimationDidStopSelector:</code> but I cannot get it to work with my current animation implementation. Any suggestions?</p>
  
  <p>Thanks.</p>