【代码笔记】iOS-实现网络图片的异步加载和缓存

时间:2024-12-20 09:03:20

代码:

【代码笔记】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];
}
【代码笔记】iOS-实现网络图片的异步加载和缓存