在iPhone App的导航栏上实现后退按钮 [英] Implement a Back Button on Navigation Bar in iPhone App

查看:65
本文介绍了在iPhone App的导航栏上实现后退按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近刚从我的开发人员那里接手了一个项目.我对编码不熟悉,但是可以很好地解决问题.我只是想在我的屏幕之一上实现后退"按钮.它已经有导航栏,但没有后退按钮,只有标题.

Just recently took over a project from my developer. I'm a noob to coding, but can figure things out pretty well. I'm just trying to implement Back button on one of my screens. It already has the navigation Bar, but no back button, just the title.

是否有有关如何实现此目标的指南?任何帮助都会很棒!

Is there a guide on how to get this implemented? Any help would be great!

谢谢!

更新=这是代码:

<object class="IBUINavigationController" id="144954994">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{320, 44}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIBarStyle">2</int>
<object class="NSArray" key="IBUIItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUINavigationController" id="445217273">
<reference key="IBUINavigationController" ref="144954994"/>
<string key="IBUITitle">Answer Question</string>
</object>
</object>
</object>

推荐答案

您是否正在使用UINavigationController?如果是这样,当您按下视图时,它将自动放置在此处.

Are you using UINavigationController's? If so, it's automatically put there when you push a view.

(基于注释进行更新)使用UINavigationBar

(Update based on comment) Using a UINavigationBar

http://developer.apple.com/iphone/library/documentation/uikit/reference/UINavigationBar_Class/Reference/UINavigationBar.html

 bar.topItem.leftBarButtonItem = // set to a UIButton

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

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