Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exit application in iOS 4.0

Tags:

ios

ios4

Before iOS4.0 clicking the home button on iPhone exits the application, and Apple had in their guide that programmatically exiting the application was not accepted.

now everything changed in iOS4.0, clicking the home button puts your app in a suspended mode (multitasking).. and I think there should be a clear way for the user to exit the app, like an exit button.

is it now OK with apple? and how can it be done?

like image 988
Tamer Avatar asked Jun 22 '10 21:06

Tamer


People also ask

How do I completely exit an app?

Close one app: Swipe up from the bottom, hold, then let go. Swipe up on the app. Close all apps: Swipe up from the bottom, hold, then let go. Swipe from left to right.

How do you close apps on iPad air 4?

To quit an app, open the App Switcher, then swipe up on the app.


2 Answers

You can set the Info.plist key UIApplicationExitsOnSuspend to make sure the app is completely terminated.

like image 72
Joost Schuur Avatar answered Sep 23 '22 08:09

Joost Schuur


No still shouldn't do this.

You have handlers for the different stages, so this is how you should do it. There's no point in exiting manually. If you restart the app, ideally it would start where you left off, so this is either by resuming or by starting and loading the old state.

No reason for exit.

Edit

As this keeps popping up again: iOS Human Interface Guidelines says "Don't Quit Programmatically". And we have seen many reports of apps that had calls to exit() in them in the past.

Exiting instead of suspending by setting the appropriate key in the Info.plist file is perfectly fine, of course - but that's not a dedicated UI Button, just application-specific implementation of program exit by the home button.

like image 45
Eiko Avatar answered Sep 26 '22 08:09

Eiko