layer.screenFrame < object>
Allows you to set or capture the absolute position of this layer on the screen, ignoring the inherited position from its parents.
译:允许您在屏幕上设置或捕捉该图层的绝对位置,忽略其父母的继承位置。
layerA = new Layer
x: 100
layerB = new Layer
parent: layerA
x: 100
print layerB.screenFrame
# Output: { x: 200, y: 0, width: 100, height: 100 }
layerB.screenFrame =
x: 400
y: 0
width: 100
height: 100
print layerB.x
# Output: 300