iphone - 退出 iphone 4 中的应用程序

标签 iphone ios4

既然 iPhone 4 确实将应用程序带到后台线程,有没有办法退出应用程序,使其不在后台?我们可以在屏幕上有一个退出按钮吗???

最佳答案

来自iOS Application Programming Guide :

If you do not want your application to remain in the background when it is quit, you can explicitly opt out of the background execution model by adding the UIApplicationExitsOnSuspend key to your application’s Info.plist file and setting its value to YES. When an application opts out, it cycles between the not running, inactive, and active states and never enters the background or suspended states. When the user taps the Home button to quit the application, the applicationWillTerminate: method of the application delegate is called and the application has approximately five seconds to clean up and exit before it is terminated and moved back to the not running state.

关于iphone - 退出 iphone 4 中的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3503614/

相关文章:

iphone - App Store开发者重命名

iphone - 在 iPhone 后台下载

ios - 允许用户将文档从iOS Mail App保存到我的应用程序

iphone - 如何使用 Alamofire 从服务器获取图像(不是 url 或 NSData )

iphone - 安全 Objective-C iPhone 登录的最佳方法

iphone - Facebook 安装的参数不返回数据

ios - 在 iPad 中分发 ipa

ios - UI自动化测试 : How do I select UIAPickerWheel values?

ios - IPA 文件困惑。如何确定我的 .ipa 文件是否可以在另一台 iPhone 上运行?

iphone - 如何通过手势更改引号