Ronaldoh1 Ronaldoh1 - 4 months ago 34x
Swift Question

How to return to Root View Controller

I am currently working on an app which presents a screen modally and another custom progress indicator modally. Is it possible to return to the root View Controller seamlessly?

Home -> screen1-> screen2(Custom progressIndicator)

I want to dismiss the custom progressIndicator (and the screen presented modally) and return to my home (root) View Controller in one go.


Thank you for the help!


You need to dismiss presented model then you can pop all the pushed view controllers. As presented model would not be in the stack of the navigation.

self.dismissViewControllerAnimated(true, completion: {});

Then you can pop to base view controller.