iphone应用程序中的后退按钮 [英] Back button in iphone app

查看:32
本文介绍了iphone应用程序中的后退按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的单一视图应用程序,主视图中有一个按钮,可将我发送到另一个带有独立 xib 文件的视图.在第二个视图中,我有一个按钮可以让我返回主视图.我没有使用导航控制器.

I have a simple single View application with a button in the main view which sends me off to another view with an independent xib file. On this second view I have a button that should send me back to the main view. I'm not using a navigation controller.

谁能告诉我如何编写这个后退"按钮,让它再次显示主视图?

Can anyone tell me how to program this "back" button so it will display the main view again?

非常感谢.

推荐答案

如果你这样调用第二个视图控制器:

If you called the second viewcontroller like this:

[self presentModalViewController:secondViewController animated:YES];

你可以这样关闭它:

[self dismissModalViewControllerAnimated:YES];

这篇关于iphone应用程序中的后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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