How can I get Speed and Direction of finger movements in touchmoved function?
I want to get the finger speed and finger direction and apply it in a UIView class dire
why not just the below as a variation on obuseme's response
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *aTouch = [touches anyObject];
CGPoint newLocation = [aTouch locationInView:self.view];
CGPoint prevLocation = [aTouch previousLocationInView:self.view];
if (newLocation.x > prevLocation.x) {
//finger touch went right
} else {
//finger touch went left
}
if (newLocation.y > prevLocation.y) {
//finger touch went upwards
} else {
//finger touch went downwards
}
}