如何隐藏标签栏并在屏幕上显示完整的表格视图? [英] How to hide tab bars and show full tableview on screen?

查看:44
本文介绍了如何隐藏标签栏并在屏幕上显示完整的表格视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用实现中,我有一个带有 5 个不同标签的标签栏控制器.

In my app's implementation, I have a tabbar controller with 5 different tabs.

通过以下代码隐藏标签栏后

After I hide my tab bar via the following code

- (void)hideTabBar
{
    for(UIView *view in self.tabController.view.subviews)
    {
        if([view isKindOfClass:[UITabBar class]] || [view isKindOfClass:[UIButton class]])
        {
            view.hidden = YES;
        }
    }
}

我仍然看到我的 tableview 的底部被一个白色的矩形部分遮住了(以前被可见的标签栏占据)

I still see the bottom portion of my tableview obscured by a white rectangular section (previously occupied by visible tabbar)

例如在我隐藏标签栏之前

For example, before I hide the tab bar

我隐藏标签栏后,tableview仍然没有完全显示在屏幕上,底部仍然被一个白色的矩形空间占据(之前被标签栏占据

After I hide the tab bar, the tableview still does not completely show on the screen, the bottom section is still occupied by a white rectangular space (previously occupied by the tab bar

如上所述,如何隐藏标签栏并确保整个 tableview 显示在我的屏幕上?

As mentioned above, how can I hide the tabbar and ensure that the whole tableview is displayed on my screen?

推荐答案

myViewController.hidesBottomBarWhenPushed = YES;

myViewController.hidesBottomBarWhenPushed = YES;

这篇关于如何隐藏标签栏并在屏幕上显示完整的表格视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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