按两次主页按钮时,在iphone中应用关闭通知 [英] Application close notification in iphone when press home button twice

查看:86
本文介绍了按两次主页按钮时,在iphone中应用关闭通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iphone中,当我们按下主页按钮时,应用程序进入后台。然后当我们按两次主页按钮时,我们可以看到正在运行的应用程序列表。然后当我们长按该图标时会出现一个红色圆形按钮,我们可以通过该按钮删除该应用程序。



我想知道是否有任何通知iphone中的特殊情况。



实际上我想在我的代码中处理这种情况,当我们通过按两次主页按钮关闭我们的应用程序时。



请告诉我一些解决方案,请告诉我有关此问题的任何说明。



谢谢

解决方案

根据这个问题。 / p>

当用户杀死应用程序时,您无法执行代码,仅适用于某些常规应用程序状态,例如活动,后台,su已落实且无效。查看 Apple的文档应用状态。


In iphone it when we press home button, application goes into the background. And then when we press home button twice we can see list of running applications. And then when we press that icon for long time one red round button comes, through which we can delete the app.

I wanted to know is there any notification comes for this particular situation in iphone.

Actually i wanted to handle this situation in my code, when we are closing our application by pressing home button twice.

Please tell me some solution and please let me know it there is any clarifications required regarding this question.

Thanks

解决方案

According to this question, when a user kills an app, it's a SIGKILL (as opposed to when iOS kills the app, which calls applicationWillTerminate).

You cannot execute code for when a user kills the app, only for some general application states, such as active, background, suspended, and inactive. Check out Apple's documentation on app states.

这篇关于按两次主页按钮时,在iphone中应用关闭通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆