If you want to know the direction when the gesture is not finished you would probably need the UIPanGestureRecognizer
and detect the direction using the velocityInView:
method.
in the *.h file:
@interface ViewController : UIViewController
@property (nonatomic, strong) UIPanGestureRecognizer *recognizer;
@end
in the *.m file:
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.recognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGesture:)];
[self.view addGestureRecognizer:self.recognizer];
}
-(void)panGesture:(UIPanGestureRecognizer *)sender
{
NSLog(@"Velocity: %@", NSStringFromCGPoint([sender velocityInView:self.view]));
// Here You need to determine the direction
}
@end