title: Swift: UIView.transitionWithView completion block issues
body: <p>I'm trying to have my UIImageView (<code>self.posterImageview</code>) cycle through a set of UIImages with an animation using the follow code:</p>
  
  <pre><code> func animatePoster (imageArray: [UIImage], count: Int = 0)
  {
              UIView.transitionWithView
              (
                  self.posterImageview,
                  duration: 2,
                  options: UIViewAnimationOptions.TransitionFlipFromBottom,
                  animations:
                  {
                      self.posterImageview.image = imageArray[count]
                  },
                  completion: 
                  {
                      finished in
                      if (count == imageArray.count - 1)  // Last image
                      {
                          self.animatePoster(imageArray)
                      }
                      else
                      {
                      self.animatePoster(imageArray, count: count + 1)
                      }
                  }
              )
  
  }
  </code></pre>
  
  <p>However it appears the completion block is not working how I imagined it should. Right now it flickers repeatedly through all the images without allowing the full animation to play before moving on to the next one. Increasing the duration of the animation does not help, and when I set a restriction on the recursion (for example, ending when I reach the final image), then all images are cycled through quickly except for the final one, which animates in correctly.</p>
  
  <p>Any insight is appreciated.  </p>