@interface CoRoViewController : UIViewController<UIGestureRecognizerDelegate>
{
UISwipeGestureRecognizer *gesture;
}
ViewController.m
-(void)viewDidLoad
{
/* SWIPE GESTURE CODE */
gesture = [[UISwipeGestureRecognizer alloc]init];
[gesture setDirection:UISwipeGestureRecognizerDirectionLeft]; // you can use right or left ;)
[gesture addTarget:self action:@selector(methodcalled)];
gesture.delegate = self;
[self.view addGestureRecognizer:gesture];
}
-(void)methodcalled
{
// Code you want to perform
}
Have fun :)