- 问题,直接给
cell.imageView.image
赋值,图片显示太小
- 解决如下 上代码
CGSize size = CGSizeMake(30, 40);
UIImage *image = [UIImage imageNamed:@"mv_book_icon"];
cell.imageView.image = image;
cell.imageView.size = size;
//调整image的大小
UIGraphicsBeginImageContextWithOptions(size, NO,0.0);
CGRect imageRect=CGRectMake(0.0, 0.0, size.width, size.height);
[image drawInRect:imageRect];
cell.imageView.image=UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
屏幕快照 2016-01-13 下午4.07.18.png
屏幕快照 2016-01-13 下午4.10.03.png