当使用hidesBottomBarWhenPushed时,我希望当我按下另一个视图时,标签栏会重新出现 [英] When using hidesBottomBarWhenPushed, i want the tab bar to reappear when i push another view

查看:112
本文介绍了当使用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时,我希望当我按下另一个视图时,标签栏会重新出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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