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..