选项卡栏始终出现在 IOS 中的每个视图控制器中。如何解决?
tab bar always appear in each view controller in IOS. How to fix that?
现在我创建了一个故事板,它的结构是这样的:
UITabBarController
|--UINavigationController
| --UIViewControllerA
| --UIViewControllerA0
| --UIViewControllerA1
| --UIViewControllerA2
|
|--UIViewControllerB
我只需要 tab bar
出现在 UIViewControllerA
和 UIViewControllerB
的底部。但是现在tab bar
出现在UIViewControllerA
、UIViewControllerA0
、UIViewControllerA1
和UIViewControllerB
的按钮上。
像这样:
最后两张图是我想要的。
但是,当我输入 UIViewControllerA0
或 UIViewControllerA1
或 UIViewControllerA2
时,它们的底部也有 tab bar
。
我不希望 tab bar
出现在这个视图控制器的按钮上(UIViewControllerA1
,UIViewControllerA1
,UIViewControllerA1
)。
我还没有为 UITabBarController
编写任何代码。故事板可以解决这个问题吗?或者我需要在代码中修复它吗?
这个值也可以从 Storyboard 为 ViewController(UIViewControllerA0,UIViewControllerA1,UIViewControllerA2):
现在我创建了一个故事板,它的结构是这样的:
UITabBarController
|--UINavigationController
| --UIViewControllerA
| --UIViewControllerA0
| --UIViewControllerA1
| --UIViewControllerA2
|
|--UIViewControllerB
我只需要 tab bar
出现在 UIViewControllerA
和 UIViewControllerB
的底部。但是现在tab bar
出现在UIViewControllerA
、UIViewControllerA0
、UIViewControllerA1
和UIViewControllerB
的按钮上。
像这样:
最后两张图是我想要的。
但是,当我输入 UIViewControllerA0
或 UIViewControllerA1
或 UIViewControllerA2
时,它们的底部也有 tab bar
。
我不希望 tab bar
出现在这个视图控制器的按钮上(UIViewControllerA1
,UIViewControllerA1
,UIViewControllerA1
)。
我还没有为 UITabBarController
编写任何代码。故事板可以解决这个问题吗?或者我需要在代码中修复它吗?
这个值也可以从 Storyboard 为 ViewController(UIViewControllerA0,UIViewControllerA1,UIViewControllerA2):