From f2fc9dd089af8f9e965ae879f3a71ff719858e0a Mon Sep 17 00:00:00 2001 From: Xuan Liu Date: Tue, 7 Mar 2017 10:13:17 +0800 Subject: [PATCH] fix #2222 move default backgroundColor to initialize() as initWithCoder also needs it --- Source/Charts/Charts/ChartViewBase.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Charts/Charts/ChartViewBase.swift b/Source/Charts/Charts/ChartViewBase.swift index 695a622996..bd32275877 100755 --- a/Source/Charts/Charts/ChartViewBase.swift +++ b/Source/Charts/Charts/ChartViewBase.swift @@ -197,10 +197,6 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate public override init(frame: CGRect) { super.init(frame: frame) - - #if os(iOS) - self.backgroundColor = NSUIColor.clear - #endif initialize() } @@ -218,6 +214,10 @@ open class ChartViewBase: NSUIView, ChartDataProvider, AnimatorDelegate internal func initialize() { + #if os(iOS) + self.backgroundColor = NSUIColor.clear + #endif + _animator = Animator() _animator.delegate = self