TabBarController + NavigationController: Push and Pop issue

I am using the first Root-View controller containing a navigation controller:

enter image description here

Now I want to switch from uiviewcontroller 1.2.1 to uiviewcontroller 1.1

All conventional solutions, such as the self.pushview and self.popView functions, do not work; They create another instance of this UITabBarController containing the pages ... Plz guys join hands .. Any help would be appreciated .........

+4
source share
2 answers

In the hierarchy of the navigation manager, you need to work a little.

to navigate the navigation controller itself to the parent navigation controller use

self.tabBarController.navigationController

Use this code

PUSH : [self.tabBarController.navigationController pushViewController:objNav animated:YES]; POP : [self.tabBarController.navigationController popViewControllerAnimated:YES]; 

Thanks,

+7
source

For Swift 3.0

PUSH:

 self.tabBarController?.navigationController?.pushViewController(ViewControleer, animated: true) self.tabBarController?.show(ViewControleer, sender: self) 

POP:

 self.tabBarController?.navigationController?.popToRootViewController(animated: true) self.tabBarController?.navigationController?.popViewController(animated: true) self.tabBarController?.navigationController?.popToViewController(ViewControleer, animated: true) 
0
source

All Articles