I have a UIScrollView
which contains many subviews. One of the subview is designed to show a linechart, so the user may need to drag horizontally. The truth is when I mean to drag my finger horizontally, the vertical scroll of the UIScrollView
is easily activated. Now I want to disable the vertical scroll in the subview of chart, and leave it active in the rest parts.
I've tried to add a UIPanGestureRecognizer
to my chart subview. It did disabled the vertical scroll but the horizontal scroll is disabled too. I know I can write codes in the handler of the gesture recognizer to tell vertical or horizontal scroll i needed. But the horizontal scroll is actually managed by the subview's controller, which is a third-party library (JBChartView
to be specific). I want to know whether there is a simple way to solve this problem.
Many thanks.