Skip to content

Instantly share code, notes, and snippets.

@pbrewczynski
Created December 28, 2014 08:30
Show Gist options
  • Save pbrewczynski/c986f102b450a7b8f161 to your computer and use it in GitHub Desktop.
Save pbrewczynski/c986f102b450a7b8f161 to your computer and use it in GitHub Desktop.
UISwipeGestureRecognizer *swipeGestureLeft = [[UISwipeGestureRecognizer alloc]
initWithTarget:self action:@selector(handleSwipeGestureLeft:)];
[self.view addGestureRecognizer:swipeGestureLeft];
swipeGestureLeft.direction = UISwipeGestureRecognizerDirectionLeft;
[swipeGestureLeft release];
UISwipeGestureRecognizer *swipeGesture = [[UISwipeGestureRecognizer alloc]
initWithTarget:self action:@selector(handleSwipeGesture:)];
swipeGesture.direction = UISwipeGestureRecognizerDirectionRight;
[self.view addGestureRecognizer:swipeGesture];
MyGestureDelegate *deleg = [[MyGestureDelegate alloc] init];
[swipeGesture setDelegate:deleg];
[swipeGesture release];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment