Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone Application Should Close, not go to Background

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

like image 343
user349302 Avatar asked Oct 20 '10 23:10

user349302


People also ask

Can I close apps running in background?

Here's how to kill background apps on Android: Go to Settings > Apps. Select an app you want to stop, then tap Force Stop. The app will relaunch when you restart your phone.

Why you shouldn't close your iPhone apps?

In fact, when you force an app to close on your iPhone, it will not only slow down your app experience but will also use up more battery life. That's because, once an app is closed completely, it needs to re-launch and reload all of its resources the next time you open the app.

Should you keep apps running in the background iPhone?

It is a common belief that you should close apps running in background to improve performance and save battery life. Unfortunately, this is a myth that is not true in almost all situations.


1 Answers

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.

like image 182
James Huddleston Avatar answered Sep 29 '22 14:09

James Huddleston