資源簡介
這個代碼,我覺得作者寫的還是很不錯,代碼也很規范,有很多好的方法在這里面值得我們學習,有感興趣的可以下來看看,我自己覺得還是很不錯。
代碼片段和文件信息
//
//??AppDelegate.m
//??新聞
//
//??Created?by?user?on?15/9/4.
//??Copyright?(c)?2015年?user.?All?rights?reserved.
//
#import?“AppDelegate.h“
#import?“RootViewController.h“
@interface?AppDelegate?()
@end
@implementation?AppDelegate
-?(BOOL)application:(UIApplication?*)application?didFinishLaunchingWithOptions:(NSDictionary?*)launchOptions?{
????UIApplication?*app?=?[UIApplication?sharedApplication];
????app.statusBarstyle?=?UIStatusBarstyleLightContent;
????//?Override?point?for?customization?after?application?launch.
????self.window=[[UIWindow?alloc]initWithframe:[UIScreen?mainScreen].bounds];
????self.window.backgroundColor=[UIColor?whiteColor];
????[self.window?makeKeyAndVisible];
????
????//設置主窗口
????RootViewController?*rootV=[[RootViewController?alloc]init];
????self.window.rootViewController=rootV;
????
????
??
????
????return?YES;
}
-?(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.
}
-?(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.
}
-?(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.
}
-?(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.
}
-?(void)applicationWillTerminate:(UIApplication?*)application?{
????//?Called?when?the?application?is?about?to?terminate.?Save?data?if?appropriate.?See?also?applicationDidEnterBackground:.
}
//發生內存警告的時候
-(void)applicationDidReceiveMemoryWarning:(UIApplication?*)application
{
????//清楚內存中的圖片
????//停止下載圖片
????[[SDWebImageManager?sharedManager]?cancelAll];
????//移除下載到內存中的圖片
????[[SDWebImageManager?sharedManager].imageCache?clearMemory];
}
@end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-05-23?10:45??news-master\
?????文件????????6148??2016-05-23?10:45??news-master\.DS_Store
?????目錄???????????0??2016-05-23?10:45??__MACOSX\
?????目錄???????????0??2016-05-23?10:45??__MACOSX\news-master\
?????文件?????????120??2016-05-23?10:45??__MACOSX\news-master\._.DS_Store
?????文件?????????494??2015-12-06?18:37??news-master\.gitignore
?????文件?????????212??2015-12-06?18:37??__MACOSX\news-master\._.gitignore
?????文件???????11358??2015-12-06?18:37??news-master\LICENSE
?????文件?????????212??2015-12-06?18:37??__MACOSX\news-master\._LICENSE
?????文件????????1572??2015-12-06?18:37??news-master\README.md
?????文件?????????212??2015-12-06?18:37??__MACOSX\news-master\._README.md
?????目錄???????????0??2016-05-23?10:44??news-master\鏂伴椈?2\
?????文件????????6148??2016-05-23?10:45??news-master\鏂伴椈?2\.DS_Store
?????目錄???????????0??2016-05-23?10:45??__MACOSX\news-master\鏂伴椈?2\
?????文件?????????212??2016-05-23?10:45??__MACOSX\news-master\鏂伴椈?2\._.DS_Store
?????目錄???????????0??2016-05-23?10:44??news-master\鏂伴椈?2\.git\
?????目錄???????????0??2015-09-04?15:16??news-master\鏂伴椈?2\.git\branches\
?????目錄???????????0??2016-05-23?10:45??__MACOSX\news-master\鏂伴椈?2\.git\
?????文件?????????212??2015-09-04?15:16??__MACOSX\news-master\鏂伴椈?2\.git\._branches
?????文件??????????15??2015-09-04?15:16??news-master\鏂伴椈?2\.git\COMMIT_EDITMSG
?????文件?????????212??2015-09-04?15:16??__MACOSX\news-master\鏂伴椈?2\.git\._COMMIT_EDITMSG
?????文件?????????137??2015-09-04?15:16??news-master\鏂伴椈?2\.git\config
?????文件?????????212??2015-09-04?15:16??__MACOSX\news-master\鏂伴椈?2\.git\._config
?????文件??????????73??2015-09-04?15:16??news-master\鏂伴椈?2\.git\desc
?????文件?????????212??2015-09-04?15:16??__MACOSX\news-master\鏂伴椈?2\.git\._desc
?????文件??????????23??2015-09-04?15:16??news-master\鏂伴椈?2\.git\HEAD
?????文件?????????212??2015-09-04?15:16??__MACOSX\news-master\鏂伴椈?2\.git\._HEAD
?????目錄???????????0??2016-05-23?10:44??news-master\鏂伴椈?2\.git\hooks\
?????文件?????????452??2015-09-04?15:16??news-master\鏂伴椈?2\.git\hooks\applypatch-msg.sample
?????目錄???????????0??2016-05-23?10:45??__MACOSX\news-master\鏂伴椈?2\.git\hooks\
?????文件?????????212??2015-09-04?15:16??__MACOSX\news-master\鏂伴椈?2\.git\hooks\._applypatch-msg.sample
............此處省略7872個文件信息
評論
共有 條評論