Documentation URL
APP生命周期状态
管理生命周期事件
Launch
初始化APP准备启动;
- APP启动时序
- 执行一次APP配置
- APP启动时序
Activation
APP显示到前台
- 准备
- [ApplicationDelegate applicationDidBecomeActive:]
当APP处于active状态时,回调
- [ApplicationDelegate applicationWillEnterForeground:]
如果APP已经处于background,怎会先调用该方法,之后再回调applicationDidBecomeActive:方法;
- [ViewController viewWillAppear:]
更新视图内容
- [ViewController viewDidAppear:]
在视图出现在屏幕上后回调;
- [ApplicationDelegate applicationDidBecomeActive:]
- 准备
Deactivation
APP处于background,被阻塞;
- [ApplicationDelegate applicationWillResignActive:]
首先调用该方法 ;在该过程中会中断app操作和保存用户关键数据;
- [ApplicationDelegate applicationDidEnterBackground:]
APP进入background回调该方法;
- [ApplicationDelegate applicationWillResignActive:]
- Background execution
- Termination
本文转自wauoen51CTO博客,原文链接:http://blog.51cto.com/7183397/2069629
,如需转载请自行联系原作者