title: iPhone wheel (of fortune) rotation momentum
body: <p>I'm having difficulties adding momentum to my spinning wheel.<br>
  I have this wheel (something like <a href="http://image.shutterstock.com/display_pic_with_logo/53000/53000,1168924950,2/stock-vector-wheel-of-fortune-room-for-your-text-vector-2494055.jpg" rel="nofollow">this</a>) and I'm rotating it around it's center by using a single touch event.<br>
  No problems here, but when the touch (aka drag) ends; I want the wheel to keep it's momentum and ease out it's movement.<br><br>
  Anyone who can give me some pointers, it doesn't necessarily have to be in objective-c.
  AS3, javascript or JAVA will also be sufficient.</p>
  
  <p><strong>* UPDATE (code for rotating the wheel) *</strong></p>
  
  <pre><code>    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
          rotation = _startAngle = atan2(384 - touchPoint.y, 512 - touchPoint.x);
      };
  
      -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
          CGPoint touchPoint = [[touches anyObject] locationInView:self.view];
          rotation = atan2(384 - touchPoint.y, 512 - touchPoint.x);
          rotation = fmod(rotation - _startAngle, M_PI * 2.0f);
          [wheel setTransform:CGAffineTransformMakeRotation(_circleRotationOffset + rotation)];   
      };
  
      -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
          _circleRotationOffset = fmod(_circleRotationOffset + rotation, M_PI * 2);
      };
  </code></pre>