在启动后不久,我的应用程序会旋转一个单独的线程。此线程检查应用程序是在后台还是处于事件状态,因为它可以从其中任何一个调用。但是,当应用程序显式启动时,[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/