I'm trying to rotate my UILabel 90 degrees about the left of the label, i.e.:
I originally did so using the following:
[self.copyrightLabel.layer setAnchorPoint:CGPointMake(0.0, 0.5)];
[self.copyrightLabel setTransform:CGAffineTransformMakeRotation(-M_PI / 2)];
But this causes my label to move to the centre of the screen:
I found this post and set it up but this has the same effect when I call:
[self setAnchorPoint:CGPointMake(0.0, 0.5) forView:_copyrightLabel];
Even if I don't rotate the UILabel it still gets moved:
Obviously the anchor point is working correctly but why does it move to the centre?
I'm using autolayout with three constraints, leading, trailing and bottom spaces.