如何隐藏标签栏并在屏幕上显示完整的表格视图?
在我的应用程序的实现中,我有一个带有 5 个不同选项卡的选项卡栏控制器。
通过以下代码隐藏标签栏后,
- (void)hideTabBar
{
for(UIView *view in self.tabController.view.subviews)
{
if([view isKindOfClass:[UITabBar class]] || [view isKindOfClass:[UIButton class]])
{
view.hidden = YES;
}
}
}
我仍然看到桌面视图的底部被白色矩形部分遮挡(之前被可见标签栏占据)
例如,在隐藏标签栏之前
我隐藏标签栏后,tableview 仍然没有完全显示在屏幕上,底部仍然被一个白色矩形空间占据(之前是这样)被标签栏占据
如上所述,如何隐藏选项卡栏并确保整个表格视图显示在屏幕上?
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;
}
}
}
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
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
As mentioned above, how can I hide the tabbar and ensure that the whole tableview is displayed on my screen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
myViewController.hidesBottomBarWhenPushed = 是;
myViewController.hidesBottomBarWhenPushed = YES;