删除标签栏

发布于 2024-10-14 20:38:55 字数 536 浏览 1 评论 0原文

在我的 iPhone 应用程序的大部分内容中,我想用导航控制器和标签栏来显示内容。 但对于少数屏幕,我需要更多空间,所以我想删除标签栏。

我发现在调用不需要标签栏的控制器之前我可以将其设置为隐藏它,

CardImageViewController *cardImage = [[CardImageViewController alloc] 
initWithNibName:@"CardImageViewController" bundle:nil];

cardImage.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:cardImage animated:YES];
[cardImage release];

问题是现在我无法让它再次显示。如果我设置

xxx.hidesBottomBarWhenPushed = NO;

下一个控制器,我仍然看不到选项卡栏,

如何让它显示。

In most part of my iPhone application I want to show things with navigation controller and tab bar.
But for few screens I need more space so I want to remove the tab bar.

I found before calling the controller that doesn’t need the tab bar I can set to hide it,

CardImageViewController *cardImage = [[CardImageViewController alloc] 
initWithNibName:@"CardImageViewController" bundle:nil];

cardImage.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:cardImage animated:YES];
[cardImage release];

The problem is now I can’t get it to display again. If I set

xxx.hidesBottomBarWhenPushed = NO;

for the next controller still I can’t see the tab bar

How do I get it to display.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

悲凉≈ 2024-10-21 20:38:55

该栏将保持隐藏状态,直到您从导航堆栈中弹出隐藏的控制器。

参考:http://developer.apple .com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html

解决此问题的一种方法是为那些要隐藏选项卡栏的控制器提供模式视图

The bar will remain hidden until you pop that controller that you hide off the navigation stack.

Refer to: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html

One way to solve this is to present modal view for those controllers that you want to hide the tab bar

萌能量女王 2024-10-21 20:38:55

您希望在哪个视图中隐藏选项卡栏,请使用

cardImage.hidesBottomBarWhenPushed = YES;

在推送之前

,现在在同一视图的 viewWillDisAppear 中,您需要

cardImage.hidesBottomBarWhenPushed = NO;

In which view you want tab Bar hide use

cardImage.hidesBottomBarWhenPushed = YES;

this before push

and now in viewWillDisAppear of same view you need

cardImage.hidesBottomBarWhenPushed = NO;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文