设置 UIImageView 的contentMode属性,根据自己的需要选择下面
UIViewContentModeScaleToFill,
UIViewContentModeScaleAspectFit, // 原比例,不变形,
UIViewContentModeScaleAspectFill, // 等比例填充
UIViewContentModeRedraw, // redraw on bounds change (calls -setNeedsDisplay)
UIViewContentModeCenter, // contents remain same size. positioned adjusted.
UIViewContentModeTop,
UIViewContentModeBottom,
UIViewContentModeLeft,
UIViewContentModeRight,
UIViewContentModeTopLeft,
UIViewContentModeTopRight,
UIViewContentModeBottomLeft,
UIViewContentModeBottomRight,