iphone - 从导航 Controller 弹出多个 View

标签 iphone ios uitableview uiviewcontroller uinavigationcontroller

我有一个应用程序,它的 Root View 是 4 个 TableView 的菜单,用户通过选择一个加载另一个 subview 的单元格来设置搜索查询,所以基本结构如下所示

Root View
- Parent View (search view)
--Sub View (user selects variables here to fill search parameters of the parent view

但是其中一个父 View 搜索参数要求将另一个 subview 推送到导航堆栈上,因此它看起来像

Root View
- Parent View (search view)
--Sub View (user selects variables here to fill search parameters of the parent view
---Sub View (related values to the previous subview i.e. Model / sub model)

我想知道是否有办法从这个 subview 弹出回到父 View .. 我知道您可以弹出单个 View 或弹出回 Root View ,但这次我想弹出两个 subview ...这可能吗?

最佳答案

UINavigationViewController

popToViewController:animated:

弹出 View Controller ,直到指定的 View Controller 位于导航堆栈的顶部。

- (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated

关于iphone - 从导航 Controller 弹出多个 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8828960/

相关文章:

ios - 为什么-stringWithContentsOfURL : returning nil for my JSON communication here?

c# - Xamarin iOS 应用程序中的反序列化需要时间

ios - 无法更改 UITableViewController 颜色背景

ios - 如何在表格 View 的第一部分添加按钮和标签,第二部分仅包含标签

iphone - Bundle ID 和 SKU 能否在另一个 iTunes Connect 帐户中重复使用?

iphone - iPhone 需要更快的 XML 读取速度

iOS 8.4 AVFoundation _attachToPlayer 或 _attachToFigPlayer 崩溃 |一个 AVPlayerItem 不能与多个 AVPlayer 实例相关联

iphone - 动态添加和删除 UITableViewCells 到 UITableView

ios - 如何布局具有不同高度的自定义 UITableViewCell

ios - 如何在 Core Data 中保存用户偏好?