隐藏故事板中的导航栏 [英] Hide navigation bar in storyboard

查看:80
本文介绍了隐藏故事板中的导航栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我如何隐藏故事板中的导航栏。我在下面的代码在模拟器中运行时运行正常,但它仍然出现在我的故事板中,这实在令我烦恼,因为它正在弄乱我的图像放置。任何人都可以帮忙吗?

Can anyone tell me how to hide the navigation bar in my storyboard. My code below is working fine when running in the simulator but it still appears in my storyboard which is really annoying me as it's messing around with the placement of my images. Can anyone help?

- (void) viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:animated];
}

- (void) viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}


推荐答案

单击顶部栏导航到的控制器Xcode右侧的属性栏。标有Top Bar的下拉列表(如上所示)将此下拉列表更改为无。

Click on the controller that has the top bar navigate to the properties bar on the right hand side of Xcode. There is a drop down labeled Top Bar (as shown above) change this drop down to none.

这篇关于隐藏故事板中的导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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