iPhone Application Should Close, not go to Background

南笙酒味 提交于 2019-12-30 06:48:51

问题


I have an application wherein when the user taps iPhone's central button, the application is sent to background, but I want it to be closed.

I can hand event and close it, but may be there is some configuration setting to deny running in the background?

Thank you


回答1:


If you want your app to terminate when the user presses the home button, set the value of UIApplicationExitsOnSuspend to YES in your app's Info.plist file. If you do this, when the user taps the home button the applicationWillTerminate: method of your app delegate will be called and then your application will terminate.



来源:https://stackoverflow.com/questions/3983154/iphone-application-should-close-not-go-to-background

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