I was very confused about these two places at first, so let's explain their connections now. 1/position and Anchorpoint are a pair of properties that are often set together to determine the position of the control frame individually set 2/position to the upper-left corner of the parent control as (0, 0), with unlimited values. The Anchorpoint is in its own upper-left corner (0, 0), and is valued at 0-1. Frame is 0 points in the upper-left corner of the parent control and has no limit. 3/position and Anchorpoint must coincide, anchorpoint default is (0.5, 0.5), Position indeterminate 4/When we have fixed the position of frame, say frame = (100,100,200,200). Then the position and Anchorpoint are also determined, how much is it? Anchorpoint default is (0.5, 0.5), because it must be coincident, so the position point for (200, 200) can be. See, With Anchorpoint and frame, position can be determined. 5/After the frame has been fixed and modified, the control will be moved again, that is, it is not said that after the frame has been written, the control is completely determined. 6/Generally, position and anchorpoint, modify one, the control will change with the run position, (200, 200), which is equivalent to changing the coordinate system (x, Y), but the value of Anchorpoint Does not change the anchorpoint, (0.5, 0.5)--(1, 1), which is relative to the original position, the top left to move 50% respectively, but the value of position will not change, modify one side, the control position is definitely to become
Position+anchorpoint and Frame application in iOS development