开发者

iPhone Application Should Close, not go to Background

开发者 https://www.devze.com 2023-01-21 10:14 出处:网络
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 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 runn开发者_运维问答ing in the background?

Thank you


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消