/***CALayer has two very important properties: position and anchorPoint @property CGPoint position; To set the position of CALayer in the parent layer, Starting from the upper left corner of the parent layer (0, 0) @property CGPoint anchorPoint is called the "anchorPoint". The "anchorPoint" is the position coordinate relative to the layer itself that determines which point on CALayer's body will be in the position indicated by the position attribute. With its top left corner as the origin (0, 0), its x and y values range from 0 to 1, the default is (0.5, 0.5), so the position of layer in the superview is determined by anchorPoint and positon. ***/ Position and anchorPoint add a red layer to the green layer. The position property determines where the red layer will be displayed, assuming the position of the red layer is (100, 100). 100) coordinate position, anchor point.Copy the code