申请终止 [英] Application Termination

查看:57
本文介绍了申请终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在设备上运行我的应用。当我在第二个视图并终止应用程序时,应用程序退出但是当我启动它时,它会直接返回到第二个视图而不是第一个视图(登录视图)。我检查控件是否转到 applicationWillTerminate 方法,但它没有进入该方法。我怎么能让我的程序进入呢?

I am running my app on a device. When I am in second view and terminate the app, the app quits but then when i launch it, it goes straight back to second view and not the first view (login view). I checked to see if the control goes to applicationWillTerminate method, but it does not go into that method. How can i make my program go into it?

推荐答案

这可能是由于iOS 4的多任务处理。当您点按主页按钮时,默认情况下您的应用程序会在受支持的设备上暂停(如果您双击主页,则可以看到所有已暂停的应用程序)。您可以设置plist键 UIApplicationExitsOnSuspend 强制UIKit退出你的应用程序,而不是暂停,当按下主页按钮时。

This is probably due to iOS 4's multitasking. When you tap the Home button, your application is by default suspended on supported devices (if you double tap Home, you can see all suspended applications). You can set the plist key UIApplicationExitsOnSuspend to force UIKit to quit your application, rather than suspend, when the home button is pressed.

如果你想要支持多任务处理模式,请查看UIApplicationDelegate实现的 applicationDidEnterBackground:方法。

If you want to support the multitasking modes, look at the applicationDidEnterBackground: method of your UIApplicationDelegate implementation.

这篇关于申请终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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