title: Recursive UIView animation continues after ViewController destroyed, new ViewController created
body: <p><strong>UPDATE</strong></p>
  
  <p>ViewController is not destroyed, new ViewController is not created. This:</p>
  
  <pre><code>TimerViewController * timerViewController = (TimerViewController *)[segue destinationViewController];
  </code></pre>
  
  <p>does not create a new instance. However, this</p>
  
  <pre><code>TimerViewController *timerViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"theID"];
  </code></pre>
  
  <p>does. So a new instance is now being used, but the same problem. </p>
  
  <p><strong>END UPDATE</strong></p>
  
  <p>I have a simple "analog digital timer" where the minutes and seconds animate smoothly to emulate the turning of a number wheel.  This is simply a ParentViewController with a list of times, selecting a time performs a segue to the TimerViewController. The TimerViewController uses a recursive UIView animation to simulate the countdown of a clock. This works well.</p>
  
  <p>I want the user to be able to transition to the next timer in the list without having to go back to the ParentViewController in order to select it. This does not work well.</p>
  
  <p>I've tried many variations, the basic pattern is for TimerViewController to ask its delegate (ParentViewController) to pop it and then to seque again to the TimerViewController using the next time from the list of times. The initial animation never terminates, the initial TimerViewController instance never "dies". When I segue to TimerViewController the second time, using what I thought was a new instance, the first animation appears to still be running, the duration of the animation which started at almost 1.0s is off the charts (closer to 0.).</p>
  
  <p>I've tried many different, increasingly desperate, ways to stop the original animation and kill the original instance.</p>
  
  <pre><code>ParentViewController.m
  
  -(void) timerViewControllerDidSwipe  (TimerViewController *)controller {
  
    [self.navigationController  popViewControllerAnimated:NO];
    controller = nil; // ?
    [self performSegueWithIdentifier:@"ShowTimer" sender:self];
  
  }
  
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  
  if ([[segue identifier] isEqualToString:@"ShowTimer"])
  {
      TimerViewController * timerViewController = (TimerViewController *)[segue destinationViewController];
      [timerViewController setDelegate:self];
  }
  
  
  TimerViewController.m  
  
  -(void) swipe:(id)selector {
      // swipe left
       stop = YES; // ivar for ^after to not call [self animate]
      [self.delegate timerViewControllerDidSwipe:self];
  }
  
  -(void) animate {
  
  // anim block here..
  
   void (^after) (BOOL) = ^(BOOL f) {
  
      if (duration % 60 == 0 &amp;&amp; duration &gt;= 60) {
  
           if (minutesAlt.center.y &lt; minutes.center.y)
           {
               CGPoint a = minutes.center;
               a.y -= 2 * displacement;
               minutes.center = a;
               minutes.text = [NSString stringWithFormat:@"%02d", (duration / 60) -1];
           }
           else
           {
              CGPoint a = minutesAlt.center;
              a.y -= 2 * displacement;
              minutesAlt.center = a;
              minutesAlt.text = [NSString stringWithFormat:@"%02d", (duration / 60) -1];
           }
      }
  
      if (duration == 0)
      {
          // end
      }
      else if (secondsAlt.center.y &lt; seconds.center.y)
      {
          CGPoint a = seconds.center;
          a.y -= 2 * displacement;
          seconds.center = a;
          duration--;
          seconds.text = [NSString stringWithFormat:@"%02d",duration % 60];
  
          if (!stop) {[self animate];}
      }
      else 
      {
          CGPoint a = secondsAlt.center;
          a.y -= 2 * displacement;
          duration--;
          secondsAlt.center = a;
          secondsAlt.text = [NSString stringWithFormat:@"%02d", duration % 60];
  
          if (!stop) {[self animate];}
      }
  };
  
  
  [UIView animateWithDuration:0.50
                        delay:0.50
                      options:UIViewAnimationOptionCurveLinear
                   animations:anim
                   completion:after];
  }
  </code></pre>
  
  <p>Any help greatly appreciated.</p>