0

我有这个视图层次结构:

UINavigationColtroller
-> UITableViewController
   -> (push) UITabBarController
      -> (tab) UITableViewController [list view]
         -> (push) UIViewController [detail view]
      -> (tab) UITableViewController
         -> (push) UIViewController
      -> (tab) UITableViewController
         -> (push) UIViewController

问题是导航栏自定义不适用于底部 3 视图控制器。这有点道理,因为有一堆导航项 3 个选项卡视图位于同一级别。

所以我只剩下这个选择:

UINavigationColtroller
-> UITableViewController (1)
   -> (modal) UITabBarController
      -> (tab) UINavigationColtroller (2)
         -> (root) UITableViewController
            -> (push) UIViewController
      -> (tab) UINavigationColtroller (3)
         -> (root) UITableViewController
            -> (push) UIViewController
      -> (tab) UINavigationColtroller (4)
         -> (root) UITableViewController
            -> (push) UIViewController

这很糟糕,因为现在有四个单独的导航堆栈。不仅故事板变得丑陋,我还在 , 中添加了额外的样板,#2连接左按钮以手动返回?#3#4#1

即使中间有一个标签栏,有没有办法只使用一个顶级导航堆栈来维护导航?

4

1 回答 1

0

我想你可以领先

UITabBarController (Replace with UINavigationColtroller)
-> UINavigationColtroller (RW UITableViewController)
   -> (With hidden Tabbar) UITableViewController  (RW UITabBarController)
        ->  (push and show Tabbar) UITableViewController [list view]
        ->  (push and show Tabbar) UIViewController [detail view]
        ->  (push and show Tabbar) UITableViewController
        ->  (push and show Tabbar) UIViewController
        ->  (push and show Tabbar) UITableViewController
        ->  (push and show Tabbar) UIViewController
于 2013-11-09T10:43:43.733 回答