后退按钮未显示在导航栏中? [英] Back button is not showing in navigation bar?

本文介绍了后退按钮未显示在导航栏中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 iPad 构建一个文章阅读应用程序并使用拆分视图控制器.
主视图包含菜单列表,详细视图控制器包含文章列表.
单击它会在新视图中打开的文章列表,我正在使用 segue 和导航控制器连接详细视图控制器和文章打开的下一个视图.
使用 Modal 样式的 Segue.我面临一个问题,文章在下一个视图中打开时没有后退按钮.

I,m building an article read app for iPad and using split view controller.
Master view contains menu list and detail view controller contains list of article.
Clicking on list of articles it opens in a new view and i’m using a segue and navigation controller to connect detail view controller and Next view in which article opens.
Segue with Modal style.I’m facing a problem there is no back button when article opens in a next view.

推荐答案

文章视图以模态呈现,因此没有后退按钮.如果您更改故事板,以便通过推送转场呈现文章视图,您将获得一个后退按钮.如果你想保持模态展示,你可以在文章视图中添加一个 UIBarButton 项(即添加一个 UIToolbar 或将文章视图控制器嵌入到 UINavigationController 中,以便你可以更新导航工具栏的 UIBarButtonItems).

The article view is being presented modally, so there is no back button. If you change your storyboard so that you're presenting the article view with a push segue, you'll get a back button. If you want to maintain the modal presentation, you can add a UIBarButton item to the article view (ie, add a UIToolbar or embed the article view controller in a UINavigationController so that you can update the UIBarButtonItems of the navigation toolbar).

这篇关于后退按钮未显示在导航栏中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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