【问题标题】:Which method gets called when we double tap the home button and send the app in the background?当我们双击主页按钮并在后台发送应用程序时,会调用哪个方法?
【发布时间】:2016-08-09 17:33:02
【问题描述】:

当我们双击主页按钮并在后台发送应用程序时,会调用哪个方法?我知道当我们按下主页按钮一次并在后台发送app 时会调用applicationDidEnterBackground。但我想知道双击时调用的确切方法。

【问题讨论】:

  • applicationWillResignActive:

标签: ios objective-c iphone ipad ios9


【解决方案1】:
-applicationWillResignActive:

更多细节可以参考苹果文档, [https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/index.html#//apple_ref/occ/intfm/UIApplicationDelegate/applicationWillResignActive:]

但这里棘手的部分是您无法确定是否是主页按钮的双击导致此函数被调用,因为当您的应用程序被电话或短信等中断时也会调用此函数.

【讨论】:

    猜你喜欢
    • 2023-03-26
    • 2011-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-06
    • 1970-01-01
    相关资源
    最近更新 更多