align.top(offset)

Position the layer to the top of its parent. If there is no parent, it will use the Screen. Top only works for the y layer property. It can be used as a property, in states and in animations.
译:把图层置于它的父图层的顶部,如果没有父图层,就默认放在屏幕顶部。这个方法只对y属性起作用。它也可以作为状态或者动画中的一个属性值。

Arguments(参数)

offset — 一个数字(可选)

layerA = new Layer
    y: Align.top

layerB = new Layer
    y: Align.top(100) # 100 pixels from the top

results matching ""

    No results matching ""