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
UIViewContentModeScaleToFill 充滿frame會變形
UIViewContentModeScaleAspectFit 長邊為主 短邊留縫隙
UIViewContentModeScaleAspectFit 長邊為主 短邊留縫隙
UIViewContentModeScaleAspectFill 短邊為主 長邊截取
UIViewContentModeScaleAspectFill 短邊為主 長邊截取
UIViewContentModeCenter 標(biāo)尺圖片原始尺寸 frame太小會超出
UIViewContentModeCenter 標(biāo)尺圖片原始尺寸 frame太小會超出
UIViewContentModeTop 標(biāo)尺圖片原始尺寸 frame太小會超出
UIViewContentModeTop 標(biāo)尺圖片原始尺寸 frame太小會超出