开发者

xcode iphone prevent app from backgrounding?

开发者 https://www.devze.com 2023-03-15 03:13 出处:网络
How can I prevent my app from backgrounding? When I press the home button the app does not seem to close but save its state. Do I have to add some code to - (void)applicationWillTerminate:?开发者_Go百

How can I prevent my app from backgrounding? When I press the home button the app does not seem to close but save its state. Do I have to add some code to - (void)applicationWillTerminate:?开发者_Go百科


I believe you are referring to preventing the application from Running in the Background?

This is controlled via the application's Info.plist.

Add:

Application does not run in background setting it to YES

or in XML

<key>UIApplicationExitsOnSuspend</key> <true/>


If you mess around with the home button's functionality Apple will NOT allow your app in the store. I tried to do the same thing but the app got rejected with reason: "The Home button's functionality is absolute and should not be changed without a valid reason.".

0

精彩评论

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