title: UINavigationController popViewControllerAnimated: crash in iOS 6
body: <p>The code below works fine in iOS 4 and 5 but crashes in iOS 6 with <code>EXC_BAD_ACCESS</code>. I'd appreciate any help in troubleshooting it. This code is being called in a <code>UITableViewController</code> that handles my app's search logic:</p>
  
  <pre><code>CATransition *transition = [CATransition animation];
  transition.duration = 0.3f;
  transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
  transition.type = kCATransitionFade;
  
  [self.navigationController.view.layer addAnimation:transition forKey:nil];
  [self.navigationController popViewControllerAnimated:NO];
  </code></pre>
  
  <p>The way I add the <code>tableView</code> is similar and doesn't crash when called:</p>
  
  <pre><code>SearchTVC *searchTable = [[SearchTVC alloc] init];
  searchTable.detailViewController = self.detailViewController;
  
  CATransition *transition = [CATransition animation];
  transition.duration = 0.3f;
  transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
  transition.type = kCATransitionFade;
  
  [self.navigationController.view.layer addAnimation:transition forKey:nil];
  [self.navigationController pushViewController:searchTable animated:NO];
  </code></pre>
  
  <p>What could be the problem?</p>
  
  <p>*<strong>EDIT</strong></p>
  
  <p>Interestingly the crash doesn't occur if I use <code>[self.navigationController popViewControllerAnimated:YES];</code> (<code>YES</code> rather than <code>NO</code>). But of course this defeats the purpose of using a custom pop animation. </p>