UIViewContentMode
typedef enum {
UIViewContentModeScaleToFill,
UIViewContentModeScaleAspectFit, // contents scaled to fit with fixed aspect. remainder is transparent
UIViewContentModeScaleAspectFill, // contents scaled to fill with fixed aspect. some portion of content may be clipped.
UIViewContentModeRedraw, // redraw on bounds change (calls -setNeedsDisplay)
UIViewContentModeCenter, // contents remain same size. positioned adjusted.
UIViewContentModeTop,
UIViewContentModeBottom,
UIViewContentModeLeft,
UIViewContentModeRight,
UIViewContentModeTopLeft,
UIViewContentModeTopRight,
UIViewContentModeBottomLeft,
UIViewContentModeBottomRight,
} UIViewContentMode;
UIViewContentModeScaleToFill
UIViewContentModeScaleAspectFit 长边为主 短边留缝隙
UIViewContentModeScaleAspectFill 短边为主 长边截取
UIViewContentModeCenter 标尺图片原始尺寸 frame太小会超出
UIViewContentModeTop 标尺图片原始尺寸 frame太小会超出