这是苹果文档中的错误吗"Strategies for Handling App State Transitions"
Is this a mistake in apple document "Strategies for Handling App State Transitions"
When your app is launched into the background—usually to handle some type of background event—the launch cycle changes slightly to the one shown in Figure 4-2.
红色箭头处应该是"Background event"吗?
不,绿色面板在那里是因为您的应用程序必须经过 "Launch Time" 才能成为后台......也就是说,如果用户没有启动它,它就无法立即启动到 "Background"至少一次。
或者换句话说……您的应用程序必须经历绿色 "Launch Time" 面板中显示的事件序列。
如果比较 4.1 和 4.2,您可以在 "Your Code" 面板中看到更改的事件。具体来说,不再调用 applicationDidBeomeActive:
并用 applicationDidEnterBackground:
代替它。
此外,一旦您的应用处于后台(即 UIApplicationState.background
) background Events will only be passed to it if your app declared the relevant requirements for background tasks。
最后,值得指出的是,这不是e sequence of events if your app is launched by a URL request。
When your app is launched into the background—usually to handle some type of background event—the launch cycle changes slightly to the one shown in Figure 4-2.
红色箭头处应该是"Background event"吗?
不,绿色面板在那里是因为您的应用程序必须经过 "Launch Time" 才能成为后台......也就是说,如果用户没有启动它,它就无法立即启动到 "Background"至少一次。
或者换句话说……您的应用程序必须经历绿色 "Launch Time" 面板中显示的事件序列。
如果比较 4.1 和 4.2,您可以在 "Your Code" 面板中看到更改的事件。具体来说,不再调用 applicationDidBeomeActive:
并用 applicationDidEnterBackground:
代替它。
此外,一旦您的应用处于后台(即 UIApplicationState.background
) background Events will only be passed to it if your app declared the relevant requirements for background tasks。
最后,值得指出的是,这不是e sequence of events if your app is launched by a URL request。