[size=medium][color=red]
1. [url=http://cwlong.iteye.com/admin/blogs/2236795]Info.plist和pch文件的作用[/url]
2. [url=http://cwlong.iteye.com/blog/2236809]UIApplication的常见使用[/url]
3. [url=http://cwlong.iteye.com/blog/2236811]AppDelegate的代理方法[/url]
4. [url=http://cwlong.iteye.com/blog/2236810]UIApplication , AppDelegate , UIWindow , UIViewController 的关系[/url]
5. [url=http://cwlong.iteye.com/blog/2236812]IOS程序的完整启动过程[/url]
[/color][/size]
﹣AppDelegate的代理方法﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣我是分割线﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣
现阶段的移动操作设备都有个特点 , 一个应用程序运行的过程中, 很容易受到打扰, 比如一个来电或者锁屏等操作,会导致应用程序进入后台或者终止
当发生这种情况的时候 , 应用程序受到干扰时, 会产生一些系统事件, 这时UIApplication会通知它的delegate对象 , 让delegate代理这些系统事件
[img]http://dl2.iteye.com/upload/attachment/0111/1057/cf58f6c7-d3e2-32e5-bb5b-0b6f4bb506b3.png[/img]
模拟内存方法 : Hardware -> Simulate Memory Warning
1. [url=http://cwlong.iteye.com/admin/blogs/2236795]Info.plist和pch文件的作用[/url]
2. [url=http://cwlong.iteye.com/blog/2236809]UIApplication的常见使用[/url]
3. [url=http://cwlong.iteye.com/blog/2236811]AppDelegate的代理方法[/url]
4. [url=http://cwlong.iteye.com/blog/2236810]UIApplication , AppDelegate , UIWindow , UIViewController 的关系[/url]
5. [url=http://cwlong.iteye.com/blog/2236812]IOS程序的完整启动过程[/url]
[/color][/size]
﹣AppDelegate的代理方法﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣我是分割线﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣
现阶段的移动操作设备都有个特点 , 一个应用程序运行的过程中, 很容易受到打扰, 比如一个来电或者锁屏等操作,会导致应用程序进入后台或者终止
当发生这种情况的时候 , 应用程序受到干扰时, 会产生一些系统事件, 这时UIApplication会通知它的delegate对象 , 让delegate代理这些系统事件
/**
* 一般在这里保存应用的数据
*/
- (void)applicationDidEnterBackground:(UIApplication *)application {
NSLog(@"进入后台的时候会调用 -- applicationDidEnterBackground");
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
NSLog(@"从后台进入时调用该方法 -- applicationWillEnterForeground");
}
/**
* 一般在这里清除不需要的内存
*/
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
{
NSLog(@"内存警告的时候会调用 -- applicationDidReceiveMemoryWarning");
}
/**
* 在App启动完毕后,就会调用该方法
*/
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
return YES;
}
[img]http://dl2.iteye.com/upload/attachment/0111/1057/cf58f6c7-d3e2-32e5-bb5b-0b6f4bb506b3.png[/img]
模拟内存方法 : Hardware -> Simulate Memory Warning