Layer Position

 

Layer Position

Originally in QuartzCore framework, layer position is defined relative to origin of its superlayer. However in QuartzCode, all layer positions are automatically converted to canvas coordinate. This is to avoid confusion if there are many nested layer hierarchies.

Generated code will appropriately convert the position to its superlayer coordinate again.

When code type changes between iOS and OSX, the coordinates in Inspector will automatically flipped to ensure correct position value displayed to the user and consistent with targeted hardware.

 

Note:

If there are position or transform keypath, the position in Inspector only reflect the position before initial animation for those keypaths. For example, if position animation is added for a layer, the position in Layer Inspector will always show its initial value regardless of indicator time.