_imageView.contentMode = UIViewContentModeScaleAspectFill;
单设UIViewContentModeScaleAspectFill,图片照片会超出imgview范围,所以需要clipsToBounds,切割一下周边。
_imageView.contentMode = UIViewContentModeScaleAspectFill;
_imageView.clipsToBounds = YES;
_imageView.contentMode = UIViewContentModeScaleAspectFill;
单设UIViewContentModeScaleAspectFill,图片照片会超出imgview范围,所以需要clipsToBounds,切割一下周边。
_imageView.contentMode = UIViewContentModeScaleAspectFill;
_imageView.clipsToBounds = YES;
本文标题:图片顶宽顶高切割方法
本文链接:https://www.haomeiwen.com/subject/aywqnttx.html
网友评论