问题描述
在我的应用实现中,我有一个带有 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;
这篇关于如何隐藏标签栏并在屏幕上显示完整的表格视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!