I made two instances of UILabel
and added them to my ViewController
\'s view.
And then I changed the anchorPoint
of each from 0.5 to 1.
Well that is exactly what an anchor point does. Before changing the anchor points, you were setting the frame based of the center of the label. After that, you are setting the frame based on the right bottom corner.
Since you were only resetting the frame for just one label, one adjusted its frame based on the new anchor point and the other one stayed at the old position.
If you want them to be at the same point, then you need to reset the frame for both of them after editing the anchor point, OR don't the anchor point at all.
This guide explains more about anchor points.