From f7ba8da840ae656c12aee7e4b6392ab814c0cd6d Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Tue, 5 May 2020 13:00:26 -0400 Subject: [PATCH] enableable stuff --- .../Atoms/Views/CarouselIndicator/BarsIndicatorView.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift index ad65049d..691dbfa0 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift @@ -42,7 +42,6 @@ open class BarsIndicatorView: CarouselIndicator { open override var isEnabled: Bool { didSet { - for (i, bar) in barReferences.enumerated() { if i == currentIndex { bar.view.backgroundColor = isEnabled ? currentIndicatorColor : disabledIndicatorColor @@ -70,8 +69,10 @@ open class BarsIndicatorView: CarouselIndicator { set (newColor) { super.indicatorColor = newColor - for (i, barTuple) in barReferences.enumerated() { - barTuple.view.backgroundColor = i == currentIndex ? currentIndicatorColor : newColor + if isEnabled { + for (i, barTuple) in barReferences.enumerated() { + barTuple.view.backgroundColor = i == currentIndex ? currentIndicatorColor : newColor + } } } }