AppDelegate 生命周期

1、程序启动
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
2、程序已经变为活跃状态
func applicationDidBecomeActive(application: UIApplication)
3、程序将要变为不活跃状态
func applicationWillResignActive(application: UIApplication) {
4、程序已经进入后台
func applicationDidEnterBackground(application: UIApplication)
5、程序将要进入前台
func applicationWillEnterForeground(application: UIApplication)
6、程序将要被杀死
func applicationWillTerminate(application: UIApplication)
方法 本地通知
aaaplication:didFimnishLanuchingWithOptions: UIApplicationDidFinishLaunchingNotification
applicationDidBecomeActive UIApplicationDidBecomeActiveNOtification
applicationWillResignActive UIApplicationWillResignActiveNotification
applicationDidEnterBackground UIApplicationDidEnterBackgroundNotification
appplicationWillEnterForeground UIApplicationwillEnterForegroundNotification
applicationWillTeminate UIApplicationWillTeminateNotification

你可能感兴趣的:(AppDelegate 生命周期)