【代码笔记】iOS-实现网络图片的异步加载和缓存
代码:
- (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];
}
本文来自博客园,作者:花儿迎风笑,转载请注明原文链接:https://www.cnblogs.com/yang-guang-girl/p/5599562.html