美文网首页
UIImageView的三种方式

UIImageView的三种方式

作者: 俊月 | 来源:发表于2015-12-11 10:53 被阅读38次
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"图片"]];
    /*
     UIViewContentModeScaleToFill,
     UIViewContentModeScaleAspectFit,      // contents scaled to fit with fixed aspect. remainder is transparent
     UIViewContentModeScaleAspectFill,
     */
    imgView.contentMode = UIViewContentModeScaleAspectFit;

fill是填充
fit是适应
aspect方面、形式
scale比例

相关文章

网友评论

      本文标题:UIImageView的三种方式

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