Skip to content

Commit

Permalink
Merge pull request #464 from coupgar/feature/tableview_hack
Browse files Browse the repository at this point in the history
Approved, pending styling: Fix Scroll issue when the graph is in a UITableView
  • Loading branch information
pmairoldi committed Oct 30, 2015
2 parents 19b0726 + f026302 commit 530cbab
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 @@ -987,6 +987,14 @@ public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChar
{
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 530cbab

Please sign in to comment.