Not running → Inactive → Active → Background → Suspended app
Not running 非運行狀態spa
Inactive 前臺非活動狀態生命週期
Active 前臺活動狀態內存
Background 後臺狀態it
Suspended 掛起狀態io
Not running → Inactive → Active後臺
Not Running → Inactive 調用appliaction:didiFinishLaunchingWithOptions:方法
方法
發出UIApplicationDidFinshLanuchingNotification通知im
Inactive → Active 調用applicationDidBecomeActive:方法img
發出UIApplicationDidBecomeActiveNotification通知
Active → Inactive → Background → Suspended
Active → Inactive 調用applicationWillResignActive發:方法
發出UIApplicationWillResignActiveNotification通知
Background → Suspended 調用applicationDidEnterBackground:方法
發出UIApplicationDidEnterBackgroundNotification通知
Active → Inactive → Background → Suspended → Not running
Background → Suspended 調用applicationDidEnterBackground:方法
發出UIApplicationDidEnterBackgroundNotification通知
Suspended → Not running 調用applicationWillTerminate:方法
發出UIApplicationWillTerminateNotification通知
Suspended → Background → Inactive → Active
Background → Inactive 調用applicationWiillEnterForeground:方法
發出UIApplicationWiillEnterForegroundNotification通知
nactive→Active 調用applicationDidBecomeActive:方法
發出UIApplicationDidBecomeActiveNotification通知
在內存清除場景俠,應用不會調用任何方法,也不會發出應用通知