gpt4 book ai didi

ios - iOS应用程序何时直接进入后台状态?

转载 作者:行者123 更新时间:2023-12-02 09:44:12 25 4
gpt4 key购买 nike

谁能告诉我一个iOS应用程序直接进入后台状态的场景吗?

这里我引用了iOS应用程序编程文档中多任务部分的内容。

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.

已添加...

在 iOS 应用程序编程文档中,如果您看到标题为 在后台启动应用程序的图 3.3,流程如下 用户点击应用程序图标 -> main() -> UIApplicationMain () -> 输入背景。当用户点击应用程序图标时,应用程序是否有可能直接进入后台。我是这样解释这个图像的。正确吗?

谢谢。

最佳答案

后台启动的一种场景 (App X)

  • X 在其 Info.plist 中注册了位置背景模式
  • X 由用户运行,并在运行时注册重大位置更改
  • 用户切换到另一个应用 Y,因此 X 进入后台,然后被暂停(每当有重大位置变化需要处理时,它将返回后台模式,然后再次暂停)
  • 应用程序 Y 占用大量内存,因此挂起的应用程序(包括 X)会被踢出内存
  • 发生了重大位置变化。现在 X 已启动到后台。

关于ios - iOS应用程序何时直接进入后台状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11015231/

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