开发者

- (void)applicationWillTerminate:(UIApplication *)application

开发者 https://www.devze.com 2023-01-11 22:45 出处:网络
I found this method in a delegate file and inserted some code. The code never gets executed, even when the home bu开发者_JAVA技巧tton is pressed. When or how does this function get called?You should u

I found this method in a delegate file and inserted some code. The code never gets executed, even when the home bu开发者_JAVA技巧tton is pressed. When or how does this function get called?


You should use applicationDidEnterBackground method if your app and OS support multitasking.

From applicationWillTerminate docs:

For applications that support background execution, this method is generally not called when the user quits the application because the application simply moves to the background in that case. However, this method may be called in situations where the application is running in the background (not suspended) and the system needs to terminate it for some reason.

0

精彩评论

暂无评论...
验证码 换一张
取 消