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 时,我希望标签栏在我推送另一个视图时重新出现
基础教程推荐
- iOS4 创建后台定时器 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
