<bdo id='bo6qC'></bdo><ul id='bo6qC'></ul>

    <i id='bo6qC'><tr id='bo6qC'><dt id='bo6qC'><q id='bo6qC'><span id='bo6qC'><b id='bo6qC'><form id='bo6qC'><ins id='bo6qC'></ins><ul id='bo6qC'></ul><sub id='bo6qC'></sub></form><legend id='bo6qC'></legend><bdo id='bo6qC'><pre id='bo6qC'><center id='bo6qC'></center></pre></bdo></b><th id='bo6qC'></th></span></q></dt></tr></i><div id='bo6qC'><tfoot id='bo6qC'></tfoot><dl id='bo6qC'><fieldset id='bo6qC'></fieldset></dl></div>

    <small id='bo6qC'></small><noframes id='bo6qC'>

      <legend id='bo6qC'><style id='bo6qC'><dir id='bo6qC'><q id='bo6qC'></q></dir></style></legend>

    1. <tfoot id='bo6qC'></tfoot>
    2. 按主页时退出应用程序

      Quit app when pressing home (按主页时退出应用程序)

        <small id='inM3o'></small><noframes id='inM3o'>

          <tbody id='inM3o'></tbody>
        <tfoot id='inM3o'></tfoot>

        • <legend id='inM3o'><style id='inM3o'><dir id='inM3o'><q id='inM3o'></q></dir></style></legend>

            <bdo id='inM3o'></bdo><ul id='inM3o'></ul>
            <i id='inM3o'><tr id='inM3o'><dt id='inM3o'><q id='inM3o'><span id='inM3o'><b id='inM3o'><form id='inM3o'><ins id='inM3o'></ins><ul id='inM3o'></ul><sub id='inM3o'></sub></form><legend id='inM3o'></legend><bdo id='inM3o'><pre id='inM3o'><center id='inM3o'></center></pre></bdo></b><th id='inM3o'></th></span></q></dt></tr></i><div id='inM3o'><tfoot id='inM3o'></tfoot><dl id='inM3o'><fieldset id='inM3o'></fieldset></dl></div>

                本文介绍了按主页时退出应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我的测试,当我退出(通过按主页按钮)我的应用程序时,由于多任务处理功能,它仍然在后台运行".但是,我希望它在按下主页按钮时退出.这只发生在我身上吗?

                I my testing, when I exit (by pressing the home button) my app, it still is "running" in the background, thanks to the multitasking feature. However, I would like it to quit when the home button is pressed. Is this only happening to me?

                无论如何,我已将其追溯到应用委托中的 applicationWillResignActiveapplicationDidBecomeActive 方法.这些被称为多任务处理,但是当我想终止时,应用程序退出活动".非常感谢有关此问题的任何指导!

                Anyway, I have tracked it down to the applicationWillResignActive and the applicationDidBecomeActive methods in the app delegate. These get called for multitasking, but when I want to terminate, the app "resigns active." Any guidance on this issue is greatly appreciated!

                推荐答案

                您的应用程序可以选择退出多任务处理(请参阅 UIApplicationExitsOnSuspend 键到 Info.plist 并将其值设置为 YES.

                Your application can opt out of multitasking (see the appropriate section in the iPhone Application Programming Guide) by adding the UIApplicationExitsOnSuspend key to your Info.plist and setting its value to YES.

                实际上,Apple 强烈建议您不要这样做,除非您有充分的理由这样做.

                In practice, Apple strongly recommends you not do this unless you have a very good reason for this behavior.

                这篇关于按主页时退出应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                EAAccessory/EASession teardown during background(EAAccessory/EASession 在后台拆除)
                Getting an NSArray of a single attribute from an NSArray(从 NSArray 获取单个属性的 NSArray)
                ImageIO: lt;ERRORgt; JPEG Corrupt JPEG data: premature end of data segment iphone - how to catch this?(ImageIO:lt;错误gt;JPEG 损坏的 JPEG 数据:iphone 数据段过早结束 - 如何捕捉到这个?)
                How to get indexPath.row of tableView which is currently being displayed?(如何获取当前正在显示的 tableView 的 indexPath.row?)
                Xcode iOS organizer submit to app store yields quot;The archive is invalidquot; error(Xcode iOS 管理器提交到应用商店产生“存档无效;错误)
                MFMessageComposeViewController alloc returns nil(MFMessageComposeViewController alloc 返回 nil)

                <small id='P9fJ0'></small><noframes id='P9fJ0'>

                    <tfoot id='P9fJ0'></tfoot>
                      <tbody id='P9fJ0'></tbody>
                  1. <i id='P9fJ0'><tr id='P9fJ0'><dt id='P9fJ0'><q id='P9fJ0'><span id='P9fJ0'><b id='P9fJ0'><form id='P9fJ0'><ins id='P9fJ0'></ins><ul id='P9fJ0'></ul><sub id='P9fJ0'></sub></form><legend id='P9fJ0'></legend><bdo id='P9fJ0'><pre id='P9fJ0'><center id='P9fJ0'></center></pre></bdo></b><th id='P9fJ0'></th></span></q></dt></tr></i><div id='P9fJ0'><tfoot id='P9fJ0'></tfoot><dl id='P9fJ0'><fieldset id='P9fJ0'></fieldset></dl></div>

                        <legend id='P9fJ0'><style id='P9fJ0'><dir id='P9fJ0'><q id='P9fJ0'></q></dir></style></legend>
                          <bdo id='P9fJ0'></bdo><ul id='P9fJ0'></ul>