title: Stop an auto-reverse / infinite-repeat UIView animation with a BOOL / completion block
body: <p>I'm setting up the following <code>UIView animateWithDuration:</code> method, with the intention of setting my <code>animationOn</code> BOOL elsewhere in the program to cancel that infinite looped repeat. I was under the impression that the <code>completion</code> block would be called each time a cycle of the animation ends, but this doesn't appear to be the case.</p>
  
  <p>Is the <code>completion</code> block ever called in a repeating animation? And if not, is there another way I can stop this animation from outside this method?</p>
  
  <pre><code>- (void) animateFirst: (UIButton *) button
  {
      button.transform = CGAffineTransformMakeScale(1.1, 1.1);
      [UIView animateWithDuration: 0.4
                            delay: 0.0
                          options: UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat
                       animations: ^{
                           button.transform = CGAffineTransformIdentity;
                       } completion: ^(BOOL finished){
                           if (!animationOn) {
                               [UIView setAnimationRepeatCount: 0];
                           }
      }];
  }
  </code></pre>