I'm using this code to show a UIViewController:
CATransition *transition = [CATransition animation];
transition.duration = 0.f;
transition.type = kCATransitionFade;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:newVC animated:NO];
and the viewController is displayed correctly. Then I'm using this code to prepare an animation (Used to animate the pop):
CATransition *transition = [CATransition animation];
transition.duration = 0.f;
transition.type = kCATransitionFade;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
However, neither of these lines will pop it:
[self.navigationController popViewControllerAnimated:NO];
[self.navigationController popToRootViewControllerAnimated:NO];
What could be the issue? Logging the navigation stack displays both the correct UIViewControllers
:
NSLog(@"%@", self.navigationController.viewControllers);