iOS 保持图片原比例在视图中显示图片内容

_pic_image.contentMode=UIViewContentModeCenter;

图片适应大小

[_pic_imagesetContentScaleFactor:[[UIScreenmainScreen]scale]];

_pic_image.contentMode=UIViewContentModeScaleAspectFill;

_pic_image.autoresizingMask=UIViewAutoresizingFlexibleHeight;

_pic_image.clipsToBounds=YES;

你可能感兴趣的:(iOS 保持图片原比例在视图中显示图片内容)