I'm looking for a tutorial or any sign that how do you create a spinning wheel that can be rotated in two directions There are photos at your finger and specific points. I have looked at the original animation but the user is stuck on the interaction side.
Any indication is highly appreciated.
By default you just need a rotate change on a UIImageView
I have posted a snippet about where the rotation angle is controlled by tracking your finger,
Broadly, atan2 ()
designates the wheel image Vector angle from center, so for a touch event on (x, y), the current angle is atan2 (y-cy, x-cx)
where (cx, cy) the wheel Track changes in this angle for the sands of delta, so that you know how often the wheel should be done when the user's finger moves
the wheel for a shaft effect at its simplest To exploit, the delta angle needs to penetrate to zero until it is more than a fixed threshold. Of course, if you want that the shaft effect looks very realistic, with proper acceleration and recession, this is another matter and you should consult a good physics book or website.
Comments
Post a Comment