Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I Know the force of a swipe Gesture Recognizers?

I want to move a image to the right or to the left with the swipe gesture recognizer, i´m already moving the image using the CCMoveTo function, but I don´t know how move the image faster or slower depends of the force of the swipe.

If the user make a strong swipe the image should move faster than if the user make a soft swipe.

Anyone have any advice?

like image 954
Vladimir Guzman Mendoza Avatar asked Dec 08 '22 20:12

Vladimir Guzman Mendoza


1 Answers

A UISwipeGestureRecognizer is a one shot thing. It fires when the device detects the gesture and is done after that.

If you want more information about the movement of the finger you should check UIPanGestureRecognizer.

like image 120
Bastian Avatar answered Jan 01 '23 03:01

Bastian