UIImageView三种方式

2015-12-11  本文已影响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(比例)

上一篇 下一篇

猜你喜欢

热点阅读