iPhone:当用户点击首页按钮时,是否可以关闭应用程序而不是在后台运行? [英] iPhone: Is it possible to close the app rather than run in background when user clicks Home Button?

查看:104
本文介绍了iPhone:当用户点击首页按钮时,是否可以关闭应用程序而不是在后台运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,当我恢复它时,每次崩溃。



我想当用户点击主页按钮,应用程序应关闭,而不是在后台模式。



有可能吗?
如果是,请让我知道。



如果没有,可以是什么解决方法,以便我的应用程序不会崩溃,当我恢复它? >

谢谢!

解决方案

strong>到应用程序不在后台运行

$



当应用程序处于后台时,由于内存不足,视图(以及在viewDidUnload中释放的对象)可能会被释放。再次重新打开应用程序时,请确保所有必需的对象都重新初始化。


I have an app which crashes everytime when I resume it.

I want that when user clicks Home button, the app should close rather than go in background mode.

Is that possible? If yes, please let me know.

If not, what could be the workaround so that my app does not crash when I resume it?

Thanks!

解决方案

In the plist, set YES to Application does not run in background key.

When ur application is in background, due to memory insufficient, the views (and the objects released in viewDidUnload) might be released. Again when reopen the application, make sure all the required objects are re-initialized.

这篇关于iPhone:当用户点击首页按钮时,是否可以关闭应用程序而不是在后台运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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