I am trying to keep track of where a finger is in a UIScrollView
.
I have subclassed UIScrollView
(see below) but unfortunately the gesture recognizer that I am adding is overriding the standard one.
As a result I get NSLog(@"Pan")
to work but unfortunately the view doesn't scroll anymore.
How can I get both gestures recognizers to work at the same time?
Thanks.
- (void)viewDidLoad:(BOOL)animated
{
[super viewDidLoad:animated];
UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)];
[scrollView addGestureRecognizer:panRecognizer];
}
- (void)pan:(id)sender {
NSLog(@"Pan");
}