Skip to content

Instantly share code, notes, and snippets.

@beelsebob
Created July 28, 2011 15:31
Show Gist options
  • Save beelsebob/1111751 to your computer and use it in GitHub Desktop.
Save beelsebob/1111751 to your computer and use it in GitHub Desktop.
- (void)viewDidLoad
{
[super viewDidLoad];
[[self sessionTable] setAllowsSelection:NO];
UIPanGestureRecognizer *gr = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panned:)];
[gr setMinimumNumberOfTouches:1];
[gr setMaximumNumberOfTouches:1];
[gr setDelegate:self];
[[self sessionTable] addGestureRecognizer:gr];
// Do any additional setup after loading the view, typically from a nib.
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
return YES;
}
- (void)panned:(UIPanGestureRecognizer *)sender
{
NSLog(@"Panned %@", NSStringFromCGPoint([sender translationInView:[self view]]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment