Frame:其位置坐标是相对于对于父view, 例如 view.frame为(100,100,200,50)
bounds:其位置坐标是相对于自己,例如:view.bounds 为(0 , 0 , 200, 50)
clipsToBounds:是类View的属性,如果设置为yes,则不显示超出父View的部分
masksToBounds:是类CALayer的属性,如果设置为yes,则不显示超出父View layer的部分
Frame:其位置坐标是相对于对于父view, 例如 view.frame为(100,100,200,50)
bounds:其位置坐标是相对于自己,例如:view.bounds 为(0 , 0 , 200, 50)
clipsToBounds:是类View的属性,如果设置为yes,则不显示超出父View的部分
masksToBounds:是类CALayer的属性,如果设置为yes,则不显示超出父View layer的部分
下一篇:UIImage设置渲染模式
在某些情况下,需要为用户添加特定的权限,例如 ALTER VIEW 权限,以允许他们修改视图。
ios view的frame和bounds之区别(位置和大
分享链接
UIView的bounds和frame区别主要在于原点,下面这张图做了详细说明。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M