Im using pan gesture for showing different images.
Pan gesuture is detecting correctly.
The problem is i want to get the time-interval between a pan gesture (in milliseconds).
So how can i fetch the time interval between a pan gesture in iPhone.
i tried in this way but it is not showing correctly.
else if([sender state] ==UIGestureRecognizerStateChanged )
{
NSLog(@"pan velocity %@ ",[NSDate date]);
self.previousTime = [NSDate date];
NSDate *currentTime = [NSDate date];
NSTimeInterval timeDifference = [currentTime timeIntervalSinceDate:previousTime];
//self.previousTime = currentTime;
NSLog(@"%f sssss",timeDifference);
}
Can anyone please help me how to find the time interval between a pan gesture in iOS.
Thanks in advance.
* Edited my post: Of course it’s
previousTime! Sorry.*