Position和AnchorPoint

@property CGPoint position;
用来设置CALayer在父层中的位置
以父层的左上角为原点(0, 0)


Position和AnchorPoint_第1张图片
image.png

@property CGPoint anchorPoint;
称为“定位点”、“锚点”
决定着CALayer身上的哪个点会在position属性所指的位置
以自己的左上角为原点(0, 0)
它的x、y取值范围都是0~1,默认值为(0.5, 0.5)


Position和AnchorPoint_第2张图片
image.png

你可能感兴趣的:(Position和AnchorPoint)