Pop to top of Navigation View Controller

2019-07-31 08:08发布

问题:

I am trying to set up a Navigation View where a user can enter in settings. Once a setting is finalized in the 3rd level (after a button press outside of the navigation bar), I would like to have the Navigation View popped back to the root. How can I do this?

回答1:

Use [UINavigationController popToRootViewControllerAnimated:animated];, where animated is a BOOL.