你的位置:首页 > 操作系统

[操作系统]【代码笔记】实现网络图片的异步加载和缓存


代码:

复制代码
- (void)viewDidLoad{  [super viewDidLoad];  // Do any additional setup after loading the view.    self.title=@"EGOImageViewDemo";    //实现网络图片的异步加载和缓存  EGOImageView *imageView = [[EGOImageView alloc] initWithPlaceholderImage:[UIImage imageNamed:@"1.jpg"]];  imageView.imageURL = [NSURL URLWithString:@"http://f.dalang.gov.cn/uppic/2011-7-16/2011071610283352633.jpg"];  imageView.frame = CGRectMake(10,100,100,100);  [self.view addSubview:imageView];}
复制代码