//1、首先对image付值
cell.imageView.image = image;
//2、调整大小
CGSize itemSize = CGSizeMake(56,56);
UIGraphicsBeginImageContextWithOptions(itemSize,NO, UIScreen.mainScreen.scale);
CGRect imageRect = CGRectMake(0.0,0.0, itemSize.width, itemSize.height);
[cell.imageView.image drawInRect:imageRect];
cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
网友评论