views:

53

answers:

1

Hi guys.. I am trying to design another app and am struggling to think of the best way to do it. I'm after some advice please!

If you imaging a bicycle wheel in the middle of the ipad (and iPhone)... I want the user to be able to click on the tyre and spin it to the left or right. Depending on the speed of the swish will drive the speed of the wheel rotation.

It should rotate around the centre of the wheel and not move any other direction.

Do I need to use some graphics code, or simply listen for the touch, check the area they touched, then rotate the image around it's centre left or right?

Really I'm after some pointers around the methods to use - I'm not being lazy and asking for code, but if anyone knows of tutorials - that would help immensely!!

Thanks for any info.

A: 

Your best bet is to use one of the UIGestureRecognizer subclasses, probably UIPanGestureRecognizer as it includes velocity.

Apple's SimpleGestureRecognizers project will help you get started.

Robot K