title: Rotate button around center
body: <p>I'm searching for a way to create a menu in an iPhone app that allows buttons to rotate around a center point. To put this in visual terms: the buttons would be planets and the center is the sun.</p>
  
  <ul>
  <li>this would allow the user to 'spin' the buttons around the circular path.</li>
  </ul>
  
  <p>** an actual example of this would be the Poynt menu for their iPhone app. **</p>
  
  <p>I got started with this code, that I found from a post by mahboudz here on SO:</p>
  
  <pre><code>- (void) runSpinAnimationWithDuration:(UIView*)animatedView withDuration:(CGFloat) duration;
  {
  CABasicAnimation* rotationAnimation;
  rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.y"];
  rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0 /* full rotation*/ * 1 * duration ];
  rotationAnimation.duration = duration;
  rotationAnimation.cumulative = YES;
  rotationAnimation.repeatCount = 1.0; 
  rotationAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
  [animatedView.layer  setAnchorPoint:CGPointMake( 0.5, 0.5 )];
  [animatedView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
  }
  </code></pre>
  
  <p>There is an interesting post on rotation here on SO: <a href="https://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees">link text</a></p>
  
  <p>Anyway, I can rotate a button - but not around a predetermined path (like the planet scenario). </p>
  
  <p>Any help would be appreciated.</p>