IOS主AppDelegate详解
2015-09-23 22:18
369 查看
// // AppDelegate.m // // // Created by 阳君 on 14/12/30. // Copyright (c) 2014年 六月. All rights reserved. // #import "AppDelegate.h" @interface AppDelegate () @end @implementation AppDelegate #pragma mark 当应用程序已经启动,并可能有额外的启动选项来处理委托 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. return YES; } #pragma mark 应用程序转入后台(非激活)状态 - (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } #pragma mark 主线程完全进入后台运行 - (void)applicationDidEnterBackground:(UIApplication *)application { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } #pragma mark 应用程序将要进入前台时(被激活) - (void)applicationWillEnterForeground:(UIApplication *)application { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } #pragma mark 应用程序转入激活状态 - (void)applicationDidBecomeActive:(UIApplication *)application { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } #pragma mark 退出程序 - (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } @end
相关文章推荐
- Android 代码版本控制器之—— SVN
- Android Studio小技巧
- Android 友盟
- Android获取栈顶的activity
- 解决 arcGis android TextSymbol乱码的问题
- Android屏幕适配全攻略(最权威的官方适配指导)
- Android 百度数据统计
- iOS本地化国际化多语言支持
- Unity3D基于帧管理器的移动管理器
- Android文本Flood it游戏源代码
- Android各种访问权限Permission详解
- 使用zookeeper来解决在分布式系统中单节点维护微信token生命周期的容灾demo【已抽象分离】[分布式锁][9.28更新]
- Android开发环境的离线安装方式(超易搭建秘籍)
- 【iOS】KVC 和 KVO 的使用场景
- Android网址
- Android JNI通过C++调用JAVA
- Unity3D 延时执行函数StartCoroutine
- [转]HorizontalScrollView介绍--支持水平滚动的android布局容器
- Android源码解析-仿今日头条PagerSlidingTabStrip滑动页面导航效果
- iOS9 News 应用