title: UIViewController does not respond to touches after CATransform3D Animation
body: <p>My "Library" style UIViewController performs a CATransform3D rotate animation with an angle of 1.75 Radians, so as to hide it before pushing (with no animation) to the next, or last view. Unfortunately, when performing an animation on popping a UIViewController, the popped VC will not respond to touches.</p>
  
  <p>Things I have tried:-</p>
  
  <ul>
  <li>To get the animation to display after popping, rather than having it not animate at all, I have to delay it by .1 seconds. To do this I use NSObject's performSelector:withObject:afterDelay. This unfortunately, while performing the animation intended perfectly, causes my name problem.</li>
  <li>To use NSTimer to perform the action after 0.1 seconds and without repeating. This does nothing.</li>
  <li>To use UIView's delay function while animating, and this means the animation is not performed.</li>
  <li>To use a selector to perform the animation by being referred to by another. To no effect.</li>
  <li>To call touchesEnded while the view was not responding to touches, with no effect.</li>
  </ul>
  
  <p>My current code, while a little untidy (my first use of Core Animation/QuartzCore), is...</p>
  
  <p>To perform the animation if popped.</p>
  
  <pre><code>//To collect it in the SecondVC
  [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(coolAnimation) name:@"ReturnSecond" object:nil];
  //To send it from the ThirdVC
  [[NSNotificationCenter defaultCenter] postNotificationName:@"ReturnSecond" object:nil];
  </code></pre>
  
  <p>To pop the VC</p>
  
  <pre><code>[[NSNotificationCenter defaultCenter] postNotificationName:@"ReturnWeird" object:nil];
  NSUInteger integer = [[self.navigationController viewControllers] indexOfObject:self];
  [[self navigationController] popToViewController:[[self.navigationController viewControllers] objectAtIndex:integer-1] animated:NO];
  </code></pre>
  
  <p>To present the animation</p>
  
  <pre><code>- (void)coolAnimation
  {
      [self performSelector:@selector(tryThis) withObject:nil afterDelay:0.1];
  }
  
  - (void)tryThis
  {
      CGRect framer = self.view.layer.frame;
      self.view.layer.anchorPoint = CGPointMake(0.f, 0.f);
      self.view.layer.frame = framer;
      [UIView beginAnimations:nil context:nil];
      [UIView setAnimationDuration:0.3];
      CATransform3D rotationAndPerspectiveTransforms = CATransform3DIdentity;
      rotationAndPerspectiveTransforms.m34 = 1.0 / 500;
      rotationAndPerspectiveTransforms = CATransform3DRotate(rotationAndPerspectiveTransforms, 0, 0, 1, 0);
      self.view.layer.transform = rotationAndPerspectiveTransforms;
      [UIView commitAnimations];
  
      CGRect framers = flippedCell.layer.frame;
      flippedCell.layer.anchorPoint = CGPointMake(0.f, 0.f);
      flippedCell.layer.frame = framers;
      [UIView beginAnimations:nil context:nil];
      [UIView setAnimationDuration:0.7];
      CATransform3D rotateTransform = CATransform3DIdentity;
      rotateTransform.m34 = 1.0 / 500;
      rotateTransform = CATransform3DRotate(rotateTransform, 0, 0, 1, 0);
      flippedCell.layer.transform = rotateTransform;
      [UIView commitAnimations];
  
      [self performSelector:@selector(cellAnimationDidStop) withObject:nil afterDelay:0.7];
  }
  
  - (void)cellAnimationDidStop
  {
      [self.tableView reloadData];
  }
  </code></pre>
  
  <p>The view is rotated 1.75 radians before pushing and so will be retained at that transform angle until it is rotated back.</p>
  
  <p>Any tips for my code would also be appreciated!</p>