From f7f15c906f23f87939a547e88a302ca64d460ab2 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Wed, 11 Mar 2020 15:22:20 -0400 Subject: [PATCH] latest --- .../CarouselIndicator/BarsIndicatorView.swift | 16 ++++------------ .../CarouselIndicator/CarouselIndicator.swift | 8 +------- .../CarouselIndicator/NumericIndicatorView.swift | 2 +- MVMCoreUI/Organisms/CarouselModel.swift | 3 ++- .../OtherHandlers/MoleculeObjectMapping.swift | 5 +++-- 5 files changed, 11 insertions(+), 23 deletions(-) diff --git a/MVMCoreUI/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift b/MVMCoreUI/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift index 1004ed25..0d80db57 100644 --- a/MVMCoreUI/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift +++ b/MVMCoreUI/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift @@ -33,15 +33,11 @@ open class BarsIndicatorView: CarouselIndicator { //-------------------------------------------------- // MARK: - Computed Properties //-------------------------------------------------- - - public var parentCarouselIndicator: CarouselIndicator? { - return superview as? CarouselIndicator - } open override var isEnabled: Bool { didSet { barReferences.forEach { view, heightConstraint in - view.backgroundColor = isEnabled ? parentCarouselIndicator?.indicatorTintColor ?? .mvmBlack : parentCarouselIndicator?.disabledIndicatorColor ?? .mvmCoolGray3 + view.backgroundColor = isEnabled ? indicatorTintColor : disabledIndicatorColor } } } @@ -80,16 +76,12 @@ open class BarsIndicatorView: CarouselIndicator { func generateBars() { - guard let numberOfPages = parentCarouselIndicator?.numberOfPages, - let currentIndex = parentCarouselIndicator?.currentIndex - else { return } - var bars = [(View, NSLayoutConstraint)]() for i in 0..