如何移至导航 Controller 中的首页?
我知道如果我想移动到根页面,我可以使用
[self.navigationController popToRootViewControllerAnimated:YES];
但我想移到 2 页前面。不是根页面和之前的页面。
我该怎么办?
最佳答案
如果您知道导航栏 View Controller 堆栈上的 viewController,那么您可以使用:
[self.navigationController popToViewController:viewControllerToShow animated:YES];
popToViewController:animated:
Pops view controllers until the specified view controller is at the top of the navigation stack.
关于iPhone : how can i move to front page in navigation Controller?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5777045/