When you use Uinavigationcontroller for app navigation, you typically use push && pop for view switching:
When a button is clicked into a new view, Pushviewcontroller is generally used, and only Uinavigationcontroller and its subclasses have the method.
When returning a view, there are generally 3 methods (which may return a multilayer view):
1.popViewController, return to the previous Layer view controller.
2.popToRootViewController, returns the root view controller.
3.popToViewController, jump to this view controller in the middle of an interface, in this way, you need to know which interface to jump to, to get the interface to jump to have a lot of ways, You can traverse the viewcontrollers array of Uinavigationcontroller and use the Iskindofclass method to get a controller object and then jump.
Of course, you can also return a view controller that specifies several layers relative to the current view controller, with the following code:
... Nsinteger index = [self.navigationController.viewControllers indexofobject:self]; [Self.navigationcontroller poptoviewcontroller:[self.navigationcontroller.viewcontrollers objectAtIndex:index-3] Animated:no];..
Questions about the Uinavigationcontroller jump