xib中view得Mode属性中的 Scale To Fill

xib中view得Mode属性中的 Scale To Fill,第1张

概述xib中view得Mode属性中的 Scale To Fill

下面是内存溢出 jb51.cc 通过网络收集整理的代码片段。

内存溢出小编现在分享给大家,也给大家做个参考。

scale的意思是:缩放,在contentMode中出现的话,就是要改变图形的大小了。aspect的意思是纵横的比例,在contentMode中的意思是保持图形的纵横比,保持图片不变形。scale aspect fill:在保持纵横比(aspect)的前提下,缩放图片(scale),使图片充满容器(fill)。scale aspect fit: 在保持纵横比(aspect)的前提下,缩放图片(scale),使图片在容器内都显示出来(fit)。scale to fill:缩放图片,使图片充满容器。因为没有aspect,所以是不保持纵横比的。//摘自http://blog.csdn.net/iunion/article/details/7494511UIVIEwContentModetypedef 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;

以上是内存溢出(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

总结

以上是内存溢出为你收集整理的xib中view得Mode属性中的 Scale To Fill全部内容,希望文章能够帮你解决xib中view得Mode属性中的 Scale To Fill所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1106150.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存