title: Objective C- Rotate a pointer in a circle
body: <p>I need to move an image around the edge of a circle image as the value changes. I tried this code as a sample to move in animation but no effect.</p>
  
  <pre><code>CGMutablePathRef path=CGPathCreateMutable()
  CGPathMoveToPoint(path,NULL,image.frame.origin.x,image.frame.origin.y)
  CGPathAddQuadCurveToPoint(path,NULL,image.frame.origin.x,image.frame.origin.y,pointer.frame.origin.x,pointer.frame.origin.y);
  
  CAKeyframeAnimation *circle=[CAKeyframeAnimation animationWithKeyPath:@"circle"];
  circle.path=path;
  [circle setCalculationMode=kCAAnimationCubic];
  [circle setFillMode=kCAFillModeForwards];
  [pointer.layer addAnimation:circle forKey:nil];
  </code></pre>
  
  <p><code>pointer</code> (<code>UIImage</code>) is the moveable object and <code>image</code> (<code>UIImage</code>) is the background image</p>