在 documentation (App States and Multitasking) Apple 提供:
If your app is launched into the background instead—usually to handle some type of background event—the launch cycle changes slightly to the one shown in Figure 3-3. The main difference is that instead of your app being made active, it enters the background state to handle the event and then is suspended shortly afterward. When launching into the background, the system still loads your app’s user interface files but it does not display the app’s window.
如何在iOS模拟器中模拟启动应用程序到后台?
如果应用程序启动到后台,是否会调用 UIApplicationDelegate
方法 -applicationDidEnterBackground:
?
最佳答案
您只需启动应用程序,然后转到模拟器中的主屏幕 - 按 cmd + shift + H
,应用程序处于后台状态,并且 - (void)applicationDidEnterBackground:( UIApplication *)application
在 appDelegate 中被调用。
关于ios - 如何在模拟器中将 iOS 应用程序启动到后台?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25883027/