在iPhone上将应用程序发送到后台

在iPhone上将应用程序发送到后台

本文介绍了在iPhone上将应用程序发送到后台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在iPhone上以编程方式将应用程序发送到后台?

Is it possible to send the application to background programmatically on iPhone?

推荐答案

在iOS 4.0下,如果另一个应用程序进入前台,则您的应用程序将置于后台,并且有足够的资源将您的应用程序保持在后台.您可以将网址发送到Safari或已注册处理程序的其他应用程序,并希望有足够的内存(等)使操作系统在启动Safari后将您的应用程序置于后台(或其他处理该URL的应用程序).如果您很幸运(通常会经常发生这种情况),则可以通过编程将应用程序发送到后台.

Under iOS 4.0, your app will be put in the background if another app enters the foreground, and there are enough resources to keep your app in the background. You could send a URL to Safari, or another app that has registered for a handler, and hope that there's enough memory (etc.) that the OS puts your app in the background after it starts Safari (or whatever app handled the URL). If you are lucky (which typically happens fairly often), you will have sent your app programmatically to the background.

当然,您的应用是在后台运行还是只是挂起,取决于其他因素(您必须在iOS 4.x中进行注册).

Of course, whether your app runs in the background, or is just suspended, depends on other things (which you have to register with iOS 4.x for).

这篇关于在iPhone上将应用程序发送到后台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 09:25