Can an iphone app shut itself down programmatically
I want the user to start the app 开发者_Python百科and leave it running. At one point, the app will finish what it is doing and will shut itself down.
How can I do that in Objective-C?This is possible by using method:
exit(0);
However, be warned that Human Interface Guideliness discourage the use of this function, as it looks as if the application had crashed. The good solution for such a usecase is to prompt user that the application has finished working, and that he may close it now.
Hope this helps, Paul
Thanks Paul. I found another thread at Proper way to exit iPhone application? Perhaps Apple doesnt like applications committing suicide ;)
精彩评论