美文网首页
UIImageView三种方式

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;

Fill(填充),Fit(试用),Aspect(方向),Scale(比例)

相关文章

网友评论

      本文标题:UIImageView三种方式

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