Created
July 28, 2011 15:31
-
-
Save beelsebob/1111751 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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