代码:
- (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]; }