UIImageView的三种方式
作者:
徐大拿 | 来源:发表于
2015-12-11 10:47 被阅读0次
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"图片"]];
/*
UIViewContentModeScaleToFill,
UIViewContentModeScaleAspectFit, // contents scaled to fit with fixed aspect. remainder is transparent
UIViewContentModeScaleAspectFill,
*/
imgView.contentMode = UIViewContentModeScaleAspectFit;
- UIViewContentModeScaleTo
Fill
:填充
- UIViewContentModeScaleAspect
Fit
:适应
- Scale:比例
Aspect:方向
本文标题:UIImageView的三种方式
本文链接:https://www.haomeiwen.com/subject/qneyhttx.html
网友评论