Push Multiple Views onto Nav Stack

NSMutableArray *controllers = [self.navigationController.viewControllers mutableCopy];
[controllers addObject:secondVc];
[controllers addObject:thirdVC];
[self.navigationController setViewControllers:controllers animated:YES];

Courtesy of Stack Overflow:

http://stackoverflow.com/questions/21857222/how-to-push-two-view-controllers-but-animate-transition-only-for-the-second-one

 

INavigationController *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;

 

Comments are closed.