ios lifecycle event

1.启动
application:didFinishLaunchingWithOptions
applicationDidBecomeActive

2.Home键退出/锁屏键退出/电话进来
applicationWillResignActive
applicationDidEnterBackground

3.后台启动
applicationWillEnterForeground
applicationDidBecomeActive

4.前台接收到通知
application:didReceiveLocalNotification 0
(UIApplicationStateActive)

5.前台接收到通知(不会触发回调事件)
此时在notification bar 不会看到记录

5.1点击(通知)
applicationWillEnterForeground
application:didReceiveLocalNotification 1
(UIApplicationStateInactive)
applicationDidBecomeActive

5.2未启动的时候点击通知
application:didFinishLaunchingWithOptions
(UIApplicationLaunchOptionsLocalNotificationKey)
applicationDidBecomeActive

6.前台状态下 下拉通知界面
applicationWillResignActive