简体   繁体   English

iPhone SDK:如何在UITabBarController中隐藏tabBar?

[英]iphone sdk: How do i hide the tabBar in my UITabBarController?

My application consists out of a tabbarcontroller and inside i got multiple navigationControllers. 我的应用程序由一个tabbarcontroller组成,内部有多个navigationControllers。 Now i want to hide the bottom bar of the tabbarcontroller from the start because the buttons on the bottom bar lead to features inside the application which are just not ready yet so i dont't want the user to see them. 现在,我想从头开始隐藏tabbarcontroller的底部栏,因为底部栏上的按钮会导致应用程序内部的功能尚未就绪,因此我不希望用户看到它们。 How do i do this? 我该怎么做呢? Thanks in advance! 提前致谢!

A couple of options: 有两个选择:

  • Set hidesBottomBarWhenPushed=YES on one of the controllers in your navigation controller. 在导航控制器中的一个控制器上设置hidesBottomBarWhenPushed = YES。 I'm not sure if this works on the root view controller of a navigation controller. 我不确定这是否适用于导航控制器的根视图控制器。
  • Hide the tab bar items by changing UITabBarController.viewControllers. 通过更改UITabBarController.viewControllers隐藏标签栏项目。 I'm not sure if it lets you have a tab bar with only one tab, but it ought to. 我不确定它是否允许您只有一个选项卡的选项卡栏,但是应该这样做。
  • Set the tab bar controller's delegate (see UITabBarControllerDelegate). 设置选项卡栏控制器的委托(请参见UITabBarControllerDelegate)。 In – tabBarController:shouldSelectViewController: , return NO if it hasn't been implemented yet. – tabBarController:shouldSelectViewController: ,如果尚未实现,则返回NO。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM