tags:

views:

47

answers:

1

Hi Frineds,

I wanted to know how we can find the speed of user's Touch and Swipes. Can some one give a sample for that?

+1  A: 

UIPanGestureRecognizer has a velocityInView: method (measured in points per second).

Ole Begemann
Hi Ole,When I used it, I got a CGPoint Value.How can I find the Speed with that?
Krishnan
Why don't you have a look at the documentation? It's all explained there.
Ole Begemann
Hi OLe Begemann,I checked there and it seems that x represents Horizontal velocity per second and y represents the Vertical velocity per second. Do you have any idea by which we can get the concrete speed using these values?
Krishnan
The Pythagorean Theorem should help you there: a² + b² = c².
Ole Begemann