美文网首页
修改Cell.imageView 大小

修改Cell.imageView 大小

作者: 爱喝农药de清凉 | 来源:发表于2017-06-26 13:18 被阅读12次

调整大小:
CGSize itemSize = CGSizeMake(40, 40);
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();

相关文章

网友评论

      本文标题:修改Cell.imageView 大小

      本文链接:https://www.haomeiwen.com/subject/qyzdcxtx.html