0

Hi fellow programmers!

What I'm trying to do:

I have an image placed in the center of the screen. When I put my finger on this image, and rotate my finger, the image should rotate as well. When i release the finger, i would like the image to decelerate for x period of time. (Let's say that it should decelerate slowly). Basically I'm trying to develop a Spin-the-bottle application, but I can't figure out the velocity part.

What I've tried:

I've used this to get the one finger rotation, and it works great so far, but it doesn't include the velocity part. And honestly, I have no idea, how to calculate the velocity.

What I'm asking of you:

A "simple" way of doing one-finger-rotation with velocity, of an UIImageView in a normal UIViewController. (Or just using this method to the rotation part, and somehow implement velocity.) Examples are appreciated!

If you have any questions, please comment!

Thanks in advance. :)

Community
  • 1
  • 1
ifraaank
  • 122
  • 2
  • 13

0 Answers0