image的contentMode简单理解

2019-12-09  本文已影响0人  BestBoy

image的contentMode

    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,

大致分为三种


UIViewContentModeScaleAspectFit与UIViewContentModeScaleAspectFill的区别
上一篇下一篇

猜你喜欢

热点阅读