Preventing an app from exiting immediately?
How can I prevent an application from 开发者_StackOverflow中文版exiting immediately? If the user press the home button while the application is saving a picture to the photo album, only a part of the picture is saved!
Thanks!
You can't. You can put code in your App Delegate's
- (void)applicationWillTerminate:(UIApplication *)application
Function to attempt to quickly finish saving the picture and notify the user that they prematurely quit the application, but there's nothing you can do to prevent a user from pressing the home button and quitting your app.
精彩评论