本文介绍了applicationWillTerminate究竟是如何在iPhone上运行的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑如何让我的iPhone应用程序尽可能防弹。

I'm considering how to make my iPhone application as "bullet proof" as possible.

现在,我正在考虑应用程序将如何响应用户在应用程序处理的关键点点击主页按钮。

Right now, I'm thinking about how the app will respond to the user hitting the home button at a critical point in the application's processing.

完全发生了什么?是否在应用程序的线程中执行了更多指令?

What exactly happens? Are any more instructions executed in the application's threads?

当调用applicationWillTerminate时,我已经读到应用程序在os杀死进程之前有几秒钟 - 再次,究竟发生了什么?

When applicationWillTerminate gets called, I've read that the application "has a few seconds before the os kills the process" - again, what exactly happens?

推荐答案

我观察到的是主屏幕立即出现,但应用程序可以在后台继续运行至少一些秒。如果花了太长时间,就会被杀死。

What I've observed is that the home screen appears immediately, but the app is allowed to continue running in the background for at least a few seconds. If it takes too long, it will get killed.

这篇关于applicationWillTerminate究竟是如何在iPhone上运行的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 22:57