Closed mehta-viru1 closed 12 years ago
This happens coz we added the pan-gesture to the StackScrollViewController which captures the horizontal gesture if any, so if you add the UISlider which usually works on horizontal bases this collide with pan-gesture and the pan-gesture take the responsibility.
add the following line in StackScrollViewController.m
// place this in init where the pangesture initalization is done (hope you will get this)
panRecognizer.delegate = self;
// end
Note: you need to place the class which you need to receive touch instead of getting the default slide behavior, here its UIControl
-(BOOL) gestureRecognizer:(UIGestureRecognizer )gestureRecognizer shouldReceiveTouch:(UITouch )touch { if ([touch.view isKindOfClass:[UIControl class]]) { return NO; } return YES; }
Thanks a lot Reefaq. Issue Solved.
Hello,
I am trying to add a UISlider to the view of the DataViewController. But the touch events are passed to the view and not to the slider due to which I am unable to move the slider. Please advise.
Thanks, Viraj