When using hidesBottomBarWhenPushed, i want the tab bar to reappear when i push another view(使用 hidesBottomBarWhenPushed 时,我希望标签栏在我推送另一个视图时重新出现)
问题描述
我有一个导航控制器.对于其中一个视图,我想隐藏底部标签栏,以便获得最大可能的屏幕空间.为此,我有:
I have a navigation controller. For one of the views i want to hide the bottom tab bar, so it gets the max possible screen real estate. To do this, i have:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.hidesBottomBarWhenPushed = YES; // To hide the tab bar
}
return self;
}
但是对于我推送到堆栈上的下一个视图,我希望标签栏重新出现.有没有办法做到这一点?
But for the next view that i push on the stack, i want the tab bar to reappear. Is there a way to do this?
推荐答案
可以让它重新出现,但会导致动画不正确.页面位于左侧,底部栏位于右侧.所以这可能不是你想要的行为.但是在同一个控制器中,在推入下一个视图控制器之前执行 self.hidesBottomBarWhenPushed = NO;
.
One can make it reappear but it will result in an incorrect animation. Page comes in left and the bottom bar right. So it is probably not the behavior you want. But in the same controller, do self.hidesBottomBarWhenPushed = NO;
before pushing the next view controller in.
这篇关于使用 hidesBottomBarWhenPushed 时,我希望标签栏在我推送另一个视图时重新出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 hidesBottomBarWhenPushed 时,我希望标签栏在我推送另一个视图时重新出现


基础教程推荐
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01
- LocationClient 与 LocationManager 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- 如何使 UINavigationBar 背景透明? 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- 如何使用 YouTube API V3? 2022-01-01