Skip to content

Commit

Permalink
Merge pull request #3852 from Lcsmarcal/didFinishAnimate
Browse files Browse the repository at this point in the history
Create `chartViewDidEndAnimate` in ChartViewDelegate
  • Loading branch information
liuxuan30 authored Mar 20, 2019
2 parents 34dafbc + e1f28b0 commit b1df472
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Charts/Charts/ChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public protocol ChartViewDelegate

// Callbacks when the chart is moved / translated via drag gesture.
@objc optional func chartTranslated(_ chartView: ChartViewBase, dX: CGFloat, dY: CGFloat)

// Callbacks when Animator stops animating
@objc optional func chartView(_ chartView: ChartViewBase, animatorDidStop animator: Animator)
}

open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate
Expand Down Expand Up @@ -992,7 +995,7 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate

open func animatorStopped(_ chartAnimator: Animator)
{

delegate?.chartView?(self, animatorDidStop: chartAnimator)
}

// MARK: - Touches
Expand Down

0 comments on commit b1df472

Please sign in to comment.