Skip to content

Instantly share code, notes, and snippets.

@pkh
pkh / gist:c2e44eb6a11d62b83977
Last active October 5, 2020 13:18
Helpful method to dismiss ALL view controllers presented on top of a root view/navigation controller.
/**
Helpful method to dismiss ALL view controllers presented on top of a
root view/navigation controller.
This method is useful if you have a variable number of view controllers
that you'd need to dimiss to return to a base view. Used for my purposes
from the AppDelegate class during the process of handling the opening of
a URL scheme.
This method also relies on implementing a category on UIViewController