ios - 多个导航 Controller 后退按钮

标签 ios xcode

我有一个看起来像这样的应用程序;

导航 Controller ->表格 View Controller ->导航 Controller 2->表格 View Controller 2

我面临的问题是我想在 Table View Controller2 上有一个“后退”按钮,它将带我回到第一个导航 Controller 。除了在 Table View Controller2 的导航栏中放置一个按钮并创建返回到第一个导航 Controller 的模式序列之外,我无法弄清楚如何在我的生活中做到这一点。我不认为苹果会喜欢那样。谁能帮忙?

最佳答案

试试这个:

NavigationController *nav = [[NavigationController alloc]init];
[self.navigationController pushViewController:nav animated:YES];                
[nav release];

关于ios - 多个导航 Controller 后退按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12864965/

相关文章:

ios - 委托(delegate)方法在使用 If 语句测试时调用失败,但在没有 If 语句的情况下正确调用

Javascript 分析 iOS 8 Safari

ios - 如何使用 translationInView : with UIPanGestureRecognizer to have an invisible slider effect?

ios - Fabric Crashlytics Beta 不断要求分发旧版本

iphone - MKReverseGeocoder "deprecated in iOS 5"

iPhone 应用架构

iOS App HTTP 不安全调用在本地测试中有效,但在存档后失败

swift - 设置自定义字体而不使用属性文本

ios - Swift不支持SDK 'iPhoneSimulator8.4.sdk'

iphone - 在 iPhone 上存储信息