Actually, I know how to push multiple viewControllers. My question focus on the animation.In a UINavigationcontroller, I try to push two viewControllers. And I cancel the animation of the first push. However, in iPhone 6, iOS9.0 simulator, and iphone6 plus iOS9.0 real device, two animations are visible... My code is following:
UINavigationController *a = (UINavigationController *)(self.tabBarController.selectedViewController);
Second11ViewController *view11 = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"second1"];
Second22ViewController *view22 = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"second2"];
view11.hidesBottomBarWhenPushed = YES;
view22.hidesBottomBarWhenPushed = YES;
[a pushViewController:view11 animated:NO];
[a pushViewController:view22 animated:YES];
Any trick to do this. I want to show animation exactly once, like I just push one viewController (actually two)..
Try to use
[a setViewControllers:@[view11, view22] animated:YES];
Hope this would be help to you :)
Exactly, view11 will not be loaded before you pop out view22.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With