我想在表格单元格中显示这么多图像。我知道两种显示图像的方法。
一个是为 UIImageView 创建一个实例并显示它
CGRect rect=CGRectMake(x,y,width,height);
UIImageView *image=[[UIImageView alloc]initWithFrame:rect];
[image setImage:[UIImage imageNamed:@"sample.jpg"]];
另一种方法是,
CGRect rect=CGRectMake(x,y,width,height);
[[UIImage imageNamed:@"sample.jpg"] drawInRect:rect];
现在,我的问题是,这两者有什么区别?哪一个是高效的?或者其他功能比这更好?
提前致谢....