Users Pricing

forum

home / developersection / forums / gesturerecognizer not working with uiscrollview in objective-c?

GestureRecognizer not working with UIScrollView in Objective-C?

Anonymous User 3029 20 Feb 2016
I have created an app using UIScrollView and I also added a gesture recognizer but calling method in gesture recognizer is not working.
this is the code:
UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc]
initWithTarget:self
action:@selector(doubbleTapHandler:)];
[self.scrollView addGestureRecognizer:doubleTap];
and this is the implementation:
-(void)doubleTapHandler:(UITapGestureRecognizer*)recognizer
{
//here I am doing some UIRelatedTasks
}
Can any one tell me how can I solve this issue?

I am a content writter !


1 Answers

Tarun Kumar 22 Feb 2016 Accepted Answer