Reputation: 97
I have ScrollView on my screen and also have two sliders on the scroll view.The problem is that my scrollview is recognizing gesture properly but slider gives me gesture trouble while moving.
So to detect the gestures of slider
I have tried following gestureRecognizer
method but still it is not working:
-(BOOL)gestureRecognizer:(UIPanGestureRecognizer *)gestureRecognizer
shouldRecognizeSimultaneouslyWithGestureRecognizer: (UISwipeGestureRecognizer *)otherGestureRecognizer
{
return YES;
}
Upvotes: 1
Views: 254
Reputation: 8782
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
if (touch.view != yourScrollView) {
return NO;
}
return YES;
}
Upvotes: 1