图片的自适应

不管是请求来的图片还是本地的图片

四行代码

[_twoimage setContentScaleFactor:[[UIScreen mainScreen] scale]];

_twoimage.contentMode =UIViewContentModeScaleAspectFill;

_twoimage.autoresizingMask = UIViewAutoresizingFlexibleHeight;

_twoimage.clipsToBounds= YES;

搞定一切.  imageView.contentMode = UIViewContentModeScaleAspectFit;

你可能感兴趣的:(图片的自适应)