Question: I have encountered this warning:

> 
> pushViewController:animated: called on while an existing transition or presentation is
>  occurring; the navigation stack will not be updated.
> 
> 
> 

While trying to call `navigationController?.popViewControllerAnimated(false)` from `UIAlertController` completion block.

Answer: 
I solved this using **DispatchQueue.main.asyncAfter** call popviewcontroller after the UIAlertController's Transition complete 

1) Show Alert

2) Call pop viewcontroller after delay

```
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
    self.navigationController?.popToRootViewController(animated: true)
}

```

This is not best way, but it works!
My Solution would be to call dismissViewControllerAnimated: first and then pop the viewcontroller from navigation stack this works for me :-

```
[self dismissViewControllerAnimated:false completion:nil];
[myNavigationControllerInstance popToRootViewControllerAnimated:true]; // myNavigationControllerInstance = Your Navigation Controller Instance

```