In my app there is a image view.Im adding PAN gesture to that image view.
This is working fine.
The image view is in landscape mode.
I want to increase a count in label while user pan to right direction and decrease that count while user pan to left direction.
I googled a lot but didn’t find a solution for this.
Can anyone please help me how to detect the direction in which the user is panning(left/right)?
In the target selector of your gesture recognizer, use
- (CGPoint)velocityInView:(UIView *)view;:P.s.: I didn’t know about this method until approx. 3 minutes before. One of Google’s first hits was the official Apple documentation.