Ios UINavigationController的嵌套
以下结构的区别是什么 A:多个导航控制器Ios UINavigationController的嵌套,ios,objective-c,Ios,Objective C,以下结构的区别是什么 A:多个导航控制器 UINavigationController `——UITabBarController |——UINavigationController | `——UIViewController |——UINavigationController | `——UIViewController |——UINavigationController | `——UIV
UINavigationController
`——UITabBarController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
`——UINavigationController
`——UIViewController
UITabBarController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
`——UINavigationController
`——UIViewController
UINavigationController
`----UITabBarController
|——UIViewController
|——UIViewController
|——UIViewController
`——UIViewController
B:单线UINavigationController
UINavigationController
`——UITabBarController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
`——UINavigationController
`——UIViewController
UITabBarController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
`——UINavigationController
`——UIViewController
UINavigationController
`----UITabBarController
|——UIViewController
|——UIViewController
|——UIViewController
`——UIViewController
C:单个UINavigationController
UINavigationController
`——UITabBarController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
`——UINavigationController
`——UIViewController
UITabBarController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
|——UINavigationController
| `——UIViewController
`——UINavigationController
`——UIViewController
UINavigationController
`----UITabBarController
|——UIViewController
|——UIViewController
|——UIViewController
`——UIViewController
在控制器层次结构中使用多个导航是不正确的。将导航推送到现有导航时,您将遇到错误:
***由于未捕获异常“NSInvalidArgumentException”而终止应用程序,原因:“不支持推送导航控制器”
这里需要一些澄清。您想解决什么问题,或者您想创建什么体系结构?您希望从这些安排中的一个或任何一个中获得什么行为?如果您正在创建基于Tabbar的应用程序,那么选项B将非常适合。选择A和C似乎是错误的。