How to go back one view in UINavigationController?

后端 未结 3 595
庸人自扰
庸人自扰 2021-02-05 00:56

Is there a method to go back one view in the stack on a UINavigationController? Or to a view with a specific title?

3条回答
  •  天涯浪人
    2021-02-05 01:31

    Take a look at popViewControllerAnimated:.

    From the documentation: This method removes the top view controller from the stack and makes the new top of the stack the active view controller.

    Usage is something like:

    [aViewController popViewControllerAnimated:YES];
    

提交回复
热议问题