仿网易新闻app


这个代码,我觉得作者写的还是很不错,代码也很规范,有很多好的方法在这里面值得我们学习,有感兴趣的可以下来看看,我自己觉得还是很不错。
资源截图
代码片段和文件信息
//
//  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
ews-master
     文件         120  2016-05-23 10:45  __MACOSX
ews-master._.DS_Store
     文件         494  2015-12-06 18:37  news-master.gitignore
     文件         212  2015-12-06 18:37  __MACOSX
ews-master._.gitignore
     文件       11358  2015-12-06 18:37  news-masterLICENSE
     文件         212  2015-12-06 18:37  __MACOSX
ews-master._LICENSE
     文件        1572  2015-12-06 18:37  news-masterREADME.md
     文件         212  2015-12-06 18:37  __MACOSX
ews-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
ews-master鏂伴椈 2
     文件         212  2016-05-23 10:45  __MACOSX
ews-master鏂伴椈 2._.DS_Store
     目录           0  2016-05-23 10:44  news-master鏂伴椈 2.git
     目录           0  2015-09-04 15:16  news-master鏂伴椈 2.gitranches
     目录           0  2016-05-23 10:45  __MACOSX
ews-master鏂伴椈 2.git
     文件         212  2015-09-04 15:16  __MACOSX
ews-master鏂伴椈 2.git._branches
     文件          15  2015-09-04 15:16  news-master鏂伴椈 2.gitCOMMIT_EDITMSG
     文件         212  2015-09-04 15:16  __MACOSX
ews-master鏂伴椈 2.git._COMMIT_EDITMSG
     文件         137  2015-09-04 15:16  news-master鏂伴椈 2.gitconfig
     文件         212  2015-09-04 15:16  __MACOSX
ews-master鏂伴椈 2.git._config
     文件          73  2015-09-04 15:16  news-master鏂伴椈 2.gitdescription
     文件         212  2015-09-04 15:16  __MACOSX
ews-master鏂伴椈 2.git._description
     文件          23  2015-09-04 15:16  news-master鏂伴椈 2.gitHEAD
     文件         212  2015-09-04 15:16  __MACOSX
ews-master鏂伴椈 2.git._HEAD
     目录           0  2016-05-23 10:44  news-master鏂伴椈 2.githooks
     文件         452  2015-09-04 15:16  news-master鏂伴椈 2.githooksapplypatch-msg.sample
     目录           0  2016-05-23 10:45  __MACOSX
ews-master鏂伴椈 2.githooks
     文件         212  2015-09-04 15:16  __MACOSX
ews-master鏂伴椈 2.githooks._applypatch-msg.sample
............此处省略7872个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)