popToRootViewController(animated:)
Pops all the view controllers on the stack except the root view controller and updates the display.
Declaration
func popToRootViewController(animated: Bool) -> [UIViewController]?Parameters
Return Value
An array of view controllers representing the items that were popped from the stack.
Discussion
The root view controller becomes the top view controller. For information on how the navigation bar is updated, see Updating the navigation bar.