title: UIViewController didRotateFromInterfaceOrientation: not being called
body: <p>I'm writing an iOS game application with some views flying around the screen which should be playable both in landscape and portrait mode. With respect to older devices and for performance reasons I decided to stop the animation while interface rotation is in progress. Animations should be stopped and continued as described in apples docs <a href="https://developer.apple.com/library/mac/documentation/cocoa/conceptual/coreanimation_guide/AdvancedAnimationTricks/AdvancedAnimationTricks.html" rel="nofollow noreferrer">https://developer.apple.com/library/mac/documentation/cocoa/conceptual/coreanimation_guide/AdvancedAnimationTricks/AdvancedAnimationTricks.html</a> which works fine. So I decided to pause the animation in <code>willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation duration: (NSTimeInterval) duration</code> and resume it in <code>didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation</code>. The problem is that if I set my view's layer speed to zero <code>didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation</code> is never called. Does anyone have an explanation for this strange behaviour?</p>
  
  <p>What I'm doing in detail is:</p>
  
  <pre><code>SGMathsMasterNoteView *noteView = [SGMathsMasterNoteView noteViewWithExercise: self.nextExercise andDelegate: self];
  [self.animationContainer insertSubview: noteView aboveSubview: self.noteStackView];
  [noteView startAnimation];
  </code></pre>
  
  <p>SGMathsMasterNoteView.m</p>
  
  <pre><code>- (void) startAnimation {
      self.frame = self.noteAnimationView.noteStackView.frame;
      CAAnimation *ani = self.noteAnimationView.motionAnimation;
      [self.layer addAnimation: ani forKey: @"fly"];
      self.layer.speed = 1.0;
      self.center = self.noteAnimationView.destroyPoint;
  }
  
  - (void) pauseAnimation {
      self.layer.speed = 0.0;
      self.layer.timeOffset = [layer convertTime:CACurrentMediaTime() fromLayer:nil];
  }
  
  - (void) resumeAnimation {
     CFTimeInterval pausedTime = self.layer.timeOffset;
     self.layer.speed = 1.0;
     self.layer.timeOffset = 0.0;
     self.layer.beginTime = 0.0;
     CFTimeInterval timeSincePause = [layer convertTime:CACurrentMediaTime() fromLayer:nil] - pausedTime;
     self.layer.beginTime = timeSincePause;
  }
  </code></pre>
  
  <p>SGGameViewController.m</p>
  
  <pre><code>- (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation duration: (NSTimeInterval) duration {
     for (SGMathsMasterNoteView *noteView in [self.animationContainer.subviews allObjectsOfClass: [SGMathsMasterNoteView class]]) {
        [noteView pauseAnimation];
     }
  }
  
  - (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation {
     for (SGMathsMasterNoteView *noteView in [self.animationContainer.subviews allObjectsOfClass: [SGMathsMasterNoteView class]]) {
        [noteView resumeAnimation];
     }
  }
  </code></pre>