UIImageView的填充方式

来源:互联网 发布:红蜘蛛软件怎么卸载 编辑:程序博客网 时间:2024/05/19 06:49

下面展示每种填充方式的效果:

1.UIViewContentModeScaleToFill

这里写图片描述

2.UIViewContentModeScaleAspectFit

这里写图片描述

3.UIViewContentModeScaleAspectFill

(1)这是没有设置clip to Bounds的效果

这里写图片描述

(2)这是设置clip to Bounds之后的效果

这里写图片描述

4.UIViewContentModeRedraw

这里写图片描述

5.UIViewContentModeCenter

这里写图片描述

6.UIViewContentModeTop

这里写图片描述

7.UIViewContentModeBottom

这里写图片描述

8.UIViewContentModeLeft

这里写图片描述

9.UIViewContentModeRight

这里写图片描述

10.UIViewContentModeTopLeft

这里写图片描述

11.UIViewContentModeTopRight

这里写图片描述

12.UIViewContentModeBottomLeft

这里写图片描述

13.UIViewContentModeBottomRight

这里写图片描述

0 0