应用的生命周期
APP生命周期状态管理生命周期事件https://developer.apple.com/documentation/uikit/core_app/managing_your_app_s_life_cycle?language=objc
https://developer.apple.com/documentation/uikit/core_app/managing_your_app_s_life_cycle?language=objc
Launch
APP启动时序初始化APP准备启动;
执行一次APP配置
Activation
准备[ApplicationDelegate applicationDidBecomeActive:]APP显示到前台
[ApplicationDelegate applicationWillEnterForeground:]当APP处于active状态时,回调
[ViewController viewWillAppear:]如果APP已经处于background,怎会先调用该方法,之后再回调applicationDidBecomeActive:方法;
[ViewController viewDidAppear:]更新视图内容
在视图出现在屏幕上后回调;
Deactivation
[ApplicationDelegate applicationWillResignActive:]APP处于background,被阻塞;
[ApplicationDelegate applicationDidEnterBackground:]首先调用该方法 ;在该过程中会中断app操作和保存用户关键数据;
Background executionTerminationAPP进入background回调该方法;
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。