Want app upgraded to 4.0 to exit completely when home button pressed

白昼怎懂夜的黑 提交于 2019-11-27 13:20:58

问题


I am working on an app for iOS 4.0. The app was originally on 2.2.1. I upgraded it to a universal app, but now it seems to be multitasking. When I press the menu button while running the app, instead of exiting it closes, but when I relaunch the app it resumes where I left off. I am assuming this is multitasking. I want it to exit, is there a way in the settings?

My guess is that the iPad target upgrade changed the plist somehow? Any thoughts?


回答1:


Open your info.plist file

Add The Key UIApplicationExitsOnSuspend or Select Application does not run in background

Set the new key to YES or Fill in the tick box




回答2:


That's not multitasking, that's Fast app switching which is now the default and is preferred in iOS 4.0.

If you disable it, that means you app has to be reloaded every time the user switches to it instead of allowing it to stay in memory. It will take longer to reload it each time.

It would be better if you implement applicationWillEnterForeground: and refresh your view rather than force the user to have to wait while your app reloads.



来源:https://stackoverflow.com/questions/3268182/want-app-upgraded-to-4-0-to-exit-completely-when-home-button-pressed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!