views:

39

answers:

2

I am doing an application in iphone that need to spin the Dart Wheel when I drag on it. The view will have a dart wheel image and when we drag the wheel it spins and slowly it stops.

Can any one help me in doing this animation.

+2  A: 

You can use CoreAnimation for the rotation animation:

[UIView beginAnimations:nil context:nil];

[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
[UIView setAnimationDuration:1.0f];
[view.layer setTransform:CGAffineTransformMakeRotation(M_PI)];

[UIView commitAnimations];

You will have to tweak the animation for your needs.

brutella
A: 

If you are talking about a web application, you should use Jquery. See here is a tutorial shows how you can animate in custom paths with jquery http://www.motyar.info/2010/04/jquery-animate-with-custom-paths.html

Motyar
Thank you Motyar. But mine is a native iPhone app. is it possible to do the same in a native app?
Shibin Moideen