How to close iPad application in Objective-C?

I want to close the iPad application as a result of clicking on UIButton. However, I have not seen how to do this in the Apple documentation.

What call do you need to close to close the application?

Thank.

+3
source share
4 answers

You can call exit (0) to shut down the application. But Apple does not like this, as it gives the user a sense of sudden failure. If you still want to have an exit function (with a potential risk of rejection), you should also send an applicationWillTerminate message (if you have something important there) to the application delegate before exiting.

+5
source

He says :

Dont quit programmatically

iOS , . , , , . , , .

, , . , , . , , "" .

, , . , .

+6

The only way to exit the application is to click the "Home" button. You cannot do this in your application, at least not in the way Apple agrees.

+3
source

You can try using the command:

exit(0);
-1
source

Source: https://habr.com/ru/post/1784572/


All Articles