美文网首页iOS定制viewiOS Developer
39、[ iOS ] UIViewContentMode 属性各

39、[ iOS ] UIViewContentMode 属性各

作者: 天听云道 | 来源:发表于2016-05-12 17:55 被阅读204次

bgImageView.contentMode = UIViewContentModeScaleAspectFit;

//------
typedef NS_ENUM(NSInteger, UIViewContentMode) {
    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,
};
别人的图

相关文章

网友评论

    本文标题:39、[ iOS ] UIViewContentMode 属性各

    本文链接:https://www.haomeiwen.com/subject/yiaurttx.html