Question: I have 3 navigation controllers. Each with many view controllers.

* **1** `NavigationController (modal Segue)`-> **2** `NavigationController (model Segue)`-> **3** `NavigationController`

Now, how do you go from #3 NavigationController back to #1 NavigationController that I have been before? So I want

* **1** `NavigationController (modal Segue)`-> **2** `NavigationController (model Segue)`-> **3** `NavigationController` (HOW???)-> **1** `NavigationController`

(To clarify, I would not want to go to a new **1** `NavigationController`. I want to go to the one that I used before.)

Help!

Answer: 
Use that:

`[self.**presentingViewController** dismissViewControllerAnimated:YES completion:nil];`

instead of:

`[self dismissViewControllerAnimated:YES completion:nil];`
this code will pop a navigation controller with all view controllers in it

```
// pop root view controller
UIViewController *rootViewController = [self.navigationController viewControllers][0];
[rootViewController dismissViewControllerAnimated:YES completion:nil];

```

so you can do something like this:

```
// pop navigationController3 without animation
UIViewController *rootViewController3 = [navigationController3 viewControllers][0];
[rootViewController3 dismissViewControllerAnimated:NO completion:nil];

// pop navigationController2 with animation
UIViewController *rootViewController2 = [navigationController2 viewControllers][0];
[rootViewController2 dismissViewControllerAnimated:YES completion:nil];

```