应用程序在关闭时不会自行关闭(App doesnt kill itself off when its closed)

系统教程 行业动态 更新时间:2024-06-14 17:01:34
应用程序在关闭时不会自行关闭(App doesnt kill itself off when its closed)

当我使用我的应用程序,并且我按下iphone屏幕下方的后退圆按钮时,它会退出应用程序。 正如你所期望的那样。

如果我然后按下应用程序图标,应用程序会再次加载该应用程序,无论我在哪个屏幕上。 而不是在主菜单重新开始。

有一些设置允许这个吗? 有没有办法禁用导致应用程序以这种方式行事的内容。

电话是3gs,操作系统版本是4.x.

谢谢 - 代码

When i am using my app, and i press the back round button below the screen of the iphone, it exits the app. As you would expect.

If i then press the app icon the app loads up again, at whatever screen I was at in the app. Rather than starting again fresh at the Main Menu.

Is there some setting that allows this? Is there someway to disable whatever it is that causes the app to act in this way.

Phone is a 3gs and the OS version is 4.x.

Thanks -Code

最满意答案

从iOS 4开始,应用程序默认在后台运行,除非您在Info.plist文件中另行指定。

按下主页按钮时要终止应用程序,请将其放置在Info.plist文件中:

UIApplicationExitsOnSuspend并将值设置为YES

http://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW1

As of iOS 4, applications run in the background by default, unless you specify otherwise in your Info.plist file.

To kill the application when you press the Home button, place this in your Info.plist file:

UIApplicationExitsOnSuspend and set the value to YES

http://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW1

更多推荐

本文发布于:2023-04-20 18:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/f52693ccb97ff83e7534a4f58223b527.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   App   doesnt   kill   closed

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!