Follow-up question about this
Say that my application has several ViewControllers
, call them A, B, C, D. Usually go back one step, i.e. From D → C, will use the return button in the NavigationBar
or through code with a line
[self.navigationController popViewControllerAnimated:YES]
I want to take several steps, for example, from D → B. This will be done with
[self.navigationController popToViewController:B animated:YES]
Unfortunately, this way I cannot decide which animation to use. Instead of the default animation, I need to use Flip animation.
The only way to do this, I found this method
[self.navigationController transitionFromViewController:self.navigationController.presentedViewController toViewController:B duration:300 options:UIViewAnimationOptionTransitionFlipFromRight animations:nil completion:nil];
Is this the only way to achieve this, or can offer a better way to do this?
source share