美文网首页
第三章:第二节 Bounds和Frame

第三章:第二节 Bounds和Frame

作者: 清杨程 | 来源:发表于2018-09-11 15:52 被阅读7次

step —1:CGRect\CGPoint\CGSize

1.CGRect结构体有两个成员:origin和size。

1>origin:坐标点类型,是CGPoint结构体。

2>size:高和宽类型,是CGsize结构体。

2.CGPoint结构体有两个成员x和y。

3.CGSizet结构体有两个成员width和height。

4.关系图

step —1:frame和bounds

1.frame属性是该视图在父视图坐标系中位置和大小。

2.bounds属性是该视图在本地坐标系中的位置和大小。

3.图解

相关文章

  • iOS 面试题目

    1、iOS frame和Bounds 以及frame和bounds区别2、 ios webView 加载HTML字...

  • bounds、scrollView滚动原理

    bounds本质:修改内容原点位置。frame和bounds都是描述的一个矩形。frame:可视范围bounds:...

  • iOS学习心得之:frame & bounds

    frame & bounds 浅显的理解的话 ** frame ** 代表元素的位置和大小.而 bounds 值...

  • bounds

    当bounds大小不变时不会影响frame,但是当bounds大小改变时会影响frame原点和大小,bounds原...

  • iOS纪录

    (1)View的Frame与Bounds区别 摘自 ios view的frame和bounds之区别(位置和大小)...

  • 深入探究frame和bounds的区别以及setbounds使用

    深入探究frame和bounds的区别以及setbounds使用 深入探究frame和bounds的区别以及set...

  • bounds和frame

    bounds的设置会改变frame,改变的计算方式是什么?

  • Bounds和frame

    frame:以父控件左上角为原点,描述可视范围。 bounds:以自己的左上角为原点,描述可视范围在内容的区域。所...

  • Frame和bounds

    写了一个纯代码tableView嵌套collectionView的demo,最后结束的时候发现图片显示乱七八糟,初...

  • frame 和 bounds

    修改 bounds 不会影响 frame 修改 bounds 只会影响子 View 的显示位置,左正右负,上正下负

网友评论

      本文标题:第三章:第二节 Bounds和Frame

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