title: Rotating a control on its rightmost bottom point
body: <p>Hi I want to rotate a control on its right bottom point(like a clock needle). I am able to do so with the following code :    </p>
  
  <pre><code>self.label.layer.anchorPoint = CGPointMake(1.0, 1.0);
  [UIView beginAnimations:nil context:nil];
  [UIView setAnimationDuration:2];
  self.label.transform = CGAffineTransformMakeRotation(M_PI/2);
  [UIView commitAnimations]; 
  </code></pre>
  
  <p>But the problem here is that my label shifts a bit on the x axis to left and then rotate. I am not getting what's wrong.. Please help.</p>
  
  <p>Similar post: <a href="https://stackoverflow.com/questions/3350315/iphone-how-do-i-rotate-an-uiimageview-around-a-point-using-core-animation-and-c">iPhone, How do I rotate an UIImageView around a point using Core Animation and CATransform3D?</a></p>