Xcode-用户界面检查器的位置X和位置Y值?

时间:2018-06-30 22:52:08

标签: xcode frame bounds cgrect cgpoint

使用Xcode用户界面检查器,Position xPosition y分别是什么值?

如果您看我的照片,我正在检查的帧从CGPoint 0,0开始,其边界为0,0。

207和327.222对应什么?

enter image description here

1 个答案:

答案 0 :(得分:0)

我想这就是视图的后盾layer位置。由于CALayers的位置是指它们的中心,因此该值实际上是检查器上尺寸的一半(414/2 = 207&654.67 / 2≃327)。我的猜测基于Z Position,它也是图层的属性。

编辑:在Apple文档中进行了一些搜索之后,此属性被描述为"Position in the parent"(单击“查看调试器大小检查器”),因为(在谈论时)视图)框架的原点。