UIViewContentMode(scrollview图片拉伸效果)

eg:     [myImage setContentMode: UIViewContentModeScaleToFill ];

 

UIViewContentMode

Specifies how a view resizes its subviews when its size changes.
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;

 

 

posted on 2012-11-15 16:21  无量少年  阅读(568)  评论(0编辑  收藏  举报

导航