[隐藏"推动视图时的标签栏 [英] "Hide" the Tab Bar When Pushing a View

查看:81
本文介绍了[隐藏"推动视图时的标签栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

纽约时报iPhone应用程序有一个带有五个标签栏项目的标签栏。当您选择最新选项卡时,应用程序会在UITableView中显示标题和摘要/摘要。当您选择要阅读的单个故事时,标签栏将消失,并替换为根据应用程序状态显示/消失的页眉和页脚。应用程序如何隐藏标签栏?

The New York Times iPhone application has a Tab Bar with five tab bar items. When you select the Latest tab, the app shows the title and abstract/summary in a UITableView. When you select an individual story to read, the Tab Bar disappears and is replaced with a header and footer that appears/disappears depending on the state of the app. How does the app "hide" the tab bar?

谢谢!

推荐答案

在要隐藏标签栏的类中实现这段代码。

Implement this piece of code in the class where you want to hide the Tab Bar.

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
    // Custom initialization
}
self.hidesBottomBarWhenPushed = YES;
return self;
}

一切顺利。

这篇关于[隐藏"推动视图时的标签栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆