Skip to content

Commit

Permalink
fix Scroll issue when the graph is in a UITableView
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaobin Chen authored and coupgar committed Oct 30, 2015
1 parent 36f67bc commit f026302
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Charts/Classes/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,14 @@ public class BarLineChartViewBase: ChartViewBase, UIGestureRecognizerDelegate
{
scrollView = scrollView?.superview
}

// If there is two scrollview together, we pick the superview of the inner scrollview.
// In the case of UITableViewWrepperView, the superview will be UITableView
if let superViewOfScrollView = scrollView?.superview where superViewOfScrollView.isKindOfClass(UIScrollView)
{
scrollView = superViewOfScrollView
}

var foundScrollView = scrollView as? UIScrollView

if (foundScrollView !== nil && !foundScrollView!.scrollEnabled)
Expand Down

0 comments on commit f026302

Please sign in to comment.