应用程序看起来像主要细节行为像tabbar控制器

时间:2013-03-15 15:24:31

标签: ios ipad uitabbarcontroller master-detail

我需要开发一些看起来像master-detail ipad app的东西,但需要像tab bar app一样。

为了更清楚,我将尝试用下面的例子来解释。

Master View        Detail View Controller
   ||                       ||
Section A   -------Navigation Controller
Section B   -------Navigation Controller
Section C   -------Navigation Controller

我在考虑如何做到这一点,并发现这个应用程序完全符合我的要求。

enter image description here

enter image description here

enter image description here

上面的app就像我想要的那样。现在与常规master detail split view controller的区别在于,在主要细节中,您将有一个detail root并需要从那里导航。

以上应用程序完成masterview上的每个项目都有自己的导航控制器,当您在masterview上选择一个项目并返回旧的选择视图时,保持堆叠状态。 (比如Facebook App但更好)。

让我们说你的

(Master)      (Detail)
Section A     Navigation Root ---->VC1--->VC2--->VC3

如果您在主人

上选择另一部分
(Master)      (Detail)
Section b     Navigation Root ---->VC1

导航between master sectionAmaster sectionB时,您会在堆栈上的相同位置找到您的观点。所以当你回到Section A时,你会看到VC3。

我的客户希望在应用中使用相同的功能。 你们有任何关于上述功能背后逻辑的想法和资源吗?

谢谢, 小号

1 个答案:

答案 0 :(得分:1)

您可以将详细视图控制器设置为标签栏控制器,并隐藏标签栏。然后,选择主表中的项目只需设置标签栏控制器的selectedIndex属性。