layer.addChild (layer)

Add a layer as a child to this layer. This will set the parent of the added layer. (Alias: addSubLayer)
译:添加一层作为一个子级到这个层。这将设置添加层的父级。(别名:addsublayer)

Arguments(参数)

layer — A layer object. 译:一层对象

layerA = new Layer
layerB = new Layer

layerA.addChild(layerB)

print layerB.parent
# Output: 

results matching ""

    No results matching ""