本文介绍了弹出特定的视图控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的导航栏控制器中具有3个视图控制器的层次结构:view1-> view2-> view3。用户完成view3之后,我想带他去view1。最好的方法是什么?
I have an hierarchy of 3 view controllers in my navigation bar controller: view1->view2->view3. After the user finished with view3 I want to take him to view1. What is the best approach to do that?
谢谢,
Nava
推荐答案
假定view3和view2已被推到导航控制器上,则可以使用-[UINavigationController popToRootViewControllerAnimated:]
或-[UINavigationController popToViewController:animated:]
完成此操作。
Assuming that view3 and view2 have already been pushed onto your navigation controller, you can use -[UINavigationController popToRootViewControllerAnimated:]
or -[UINavigationController popToViewController:animated:]
to accomplish this.
这篇关于弹出特定的视图控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!