1

I have a UISlider in UIScrollView and find it's difficult to drag. I have set right contentSize of scroll view, so the scroll view is only able to scroll vertical.

I guess there is a conflict between scroll view and slider when they detect the gesture. Does anyone have idea on this?

Lal Krishna
  • 15,485
  • 6
  • 64
  • 84
RayChen
  • 1,417
  • 2
  • 17
  • 36
  • Hey @RayChen Can i show code and storyboard screen shot – kalpesh satasiya Aug 21 '17 at 03:52
  • Please check your Scroll View Style and Will you please add some of the code here so make it more clear that – Raksha Saini Aug 21 '17 at 04:06
  • try this :https://stackoverflow.com/questions/11004419/touch-on-uislider-prevents-scrolling-of-uiscrollview – ColeX Aug 21 '17 at 07:13
  • try this in view did load - (BOOL)gestureRecognizer:(UIPanGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UISwipeGestureRecognizer *)otherGestureRecognizer { return NO; } – Maulik shah Aug 21 '17 at 11:41
  • @Maulikshah Thanks, I have tried this. It doesn't help. – RayChen Aug 22 '17 at 01:51
  • @ColeXia, thanks. But in apple's document for this function, it said " The default returned value is YES if view is not a UIControl object; otherwise, it returns NO." – RayChen Aug 22 '17 at 01:54

0 Answers0