0%

IOS设置固定大小的图片

`固定图片大小

UIImage * img = [UIImage imageNamed:@"doorlogo"];

CGSize itemSize = CGSizeMake(60, 60);
UIGraphicsBeginImageContext(itemSize);
CGRect imageRect = CGRectMake(0, 0, itemSize.width, itemSize.height);
[img drawInRect:imageRect];
cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();`