模态segue,导航栏消失 [英] Modal segue, navigation bar disappears

查看:95
本文介绍了模态segue,导航栏消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode 4.6.1在Objective-C上编码。我想知道当我在2个View控制器之间创建模态segue时如何保持导航栏显示,因为我在故事板中执行segue,当我运行应用程序时,第二个视图控制器的导航栏消失了,我在那个栏上有一个完成按钮,但我看不到它。

I'm using Xcode 4.6.1 to code on Objective-C. I want to know how can I keep the navigation bar shown when I create a modal segue between 2 View controllers, because I'm doing the segue in the storyboard and when I run the application the navigation bar of the second view controller disappears, and I have a done button on that bar but I can't see it.

推荐答案

模态segues接管整个屏幕,所以将覆盖演示控制器中的任何导航栏,工具栏或标签栏。如果您想在此模态控制器上使用导航栏,则需要专门为其添加一个导航栏,并将所需的任何按钮添加到该新导航栏(或工具栏)。如果您不想这样做,那么不要以模态方式呈现它,请按下它。

Modal segues take over the whole screen, so any navigation bars, tool bars, or tab bars that are in the presenting controller will be covered up. If you want a navigation bar on this modal controller, you'll need to add one specifically to it, and add any buttons you want to that new navigation bar (or tool bar). If you don't want to do this, then don't present it modally, do a push to it.

这篇关于模态segue,导航栏消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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