The code below works fine in iOS 4 and 5, but crashes in iOS 6 with EXC_BAD_ACCESS . I would appreciate any help in resolving it. This code is called in the UITableViewController , which handles the application search logic:
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];
The way to add a tableView similar and is not called when called:
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];
What could be the problem?
* CHANGE
Interestingly, the crash does not occur if I use [self.navigationController popViewControllerAnimated:YES]; ( YES , not NO ). But of course, this defeats the goal of using custom pop animations.
source share