gpt4 book ai didi

iphone - 尽管应用程序在前台,但 UIApplicationState 返回 Inactive

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:26:30 45 4
gpt4 key购买 nike

在启动后不久,我的应用程序会旋转一个单独的线程。此线程检查应用程序是在后台还是处于事件状态,因为它可以从其中任何一个调用。但是,当应用程序显式启动时,[UIApplication sharedApplication].applicationState 返回 UIApplicationStateInactive。我希望它返回 UIApplicationStateActive。这是怎么回事?谢谢!

最佳答案

苹果文档中是这么说的:

You should use this method to initialize your application and prepare it for running. It is called after your application has been launched and its main nib file has been loaded. At the time this method is called, your application is in the inactive state. At some point after this method returns, a subsequent delegate method is called to move your application to the active (foreground) state or the background state.

关于iphone - 尽管应用程序在前台,但 UIApplicationState 返回 Inactive,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8212183/

45 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com