AppDelegate 生命周期(一)

所有默认的生命周期函数

• applicationWillFinishLaunching
• applicationDilFinishLaunching
• applicationWillBecomeActive
• applicationDidBecomeActive
• applicationWillResignActive
• applicationDidResignActive
• applicationWillUpdate
• applicationDidUpdate
• applicationWillHide
• applicationDidHide
• applicationWillUnhide
• applicationDidUnhide
• applicationDidChangeOcclusionState
• applicationShouldTerminate
• applicationWillTerminate

应用程序启动时

• applicationWillFinishLaunching
• applicationWillBecomeActive
• applicationDidBecomeActive
• applicationDidFinishLaunching
• applicationDidChangeOcclusionState

应用程序退出时

• applicationShouldTerminate
• applicationWillTerminate

点击隐藏应用(Hide)

• applicationWillHide
• applicationDidHide
• applicationWillResignActive
• applicationDidResignActive
• applicationDidChangeOcclusionState

点击展示应该(show)

• applicationWillUnhide
• applicationDidUnhide
• applicationWillBecomeActive
• applicationDidBecomeActive
• applicationDidChangeOcclusionState

点击最小化

• applicationDidChangeOcclusionState
• applicationWillResignActive
• applicationDidResignActive

最小化后展示

• applicationDidChangeOcclusionState
• applicationWillBecomeActive
• applicationDidBecomeActive

变成活跃状态

• applicationWillBecomeActive
• applicationDidBecodeActive

退出活跃状态

• applicationWillResignActive
• applicationDidResignActive

改变界面的状态

• applicationDidChangeOcclusionState

更新状态

• applicationWillUpdate
• applicationDidUpdate

下一篇将会对每一个生命周期函数进行详解:
AppDelegate 生命周期二:https://www.cnblogs.com/Jaryer/p/14036641.html

posted @ 2020-11-26 12:10  JunCode  阅读(290)  评论(0编辑  收藏  举报