From a011eb73a4b0647dcb87e8f8e007c3734075de60 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Mon, 9 Mar 2020 10:35:45 -0400 Subject: [PATCH] latest --- MVMCoreUI.xcodeproj/project.pbxproj | 19 +- .../BarsCarouselIndicatorModel.swift | 43 +++++ .../BarsIndicatorView.swift | 22 +-- .../CarouselIndicator/CarouselIndicator.swift | 172 +++++++++--------- .../CarouselIndicatorModel.swift | 16 +- .../NumericCarouselIndicatorModel.swift | 42 +++++ .../NumericIndicatorView.swift | 20 +- 7 files changed, 209 insertions(+), 125 deletions(-) create mode 100644 MVMCoreUI/Atoms/Views/CarouselIndicator/BarsCarouselIndicatorModel.swift rename MVMCoreUI/Atoms/Views/CarouselIndicator/{IndicatorViews => }/BarsIndicatorView.swift (88%) create mode 100644 MVMCoreUI/Atoms/Views/CarouselIndicator/NumericCarouselIndicatorModel.swift rename MVMCoreUI/Atoms/Views/CarouselIndicator/{IndicatorViews => }/NumericIndicatorView.swift (85%) diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj index f55d04b2..a0884e30 100644 --- a/MVMCoreUI.xcodeproj/project.pbxproj +++ b/MVMCoreUI.xcodeproj/project.pbxproj @@ -98,6 +98,8 @@ 0A7EF86523D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7EF86423D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift */; }; 0A7EF86723D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7EF86623D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift */; }; 0AA33B3A2398524F0067DD0F /* Toggle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AA33B392398524F0067DD0F /* Toggle.swift */; }; + 0AAF8E2A240EA57D008DD263 /* BarsCarouselIndicatorModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AAF8E29240EA57D008DD263 /* BarsCarouselIndicatorModel.swift */; }; + 0AAF8E2C240EA594008DD263 /* NumericCarouselIndicatorModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AAF8E2B240EA594008DD263 /* NumericCarouselIndicatorModel.swift */; }; 0ABD136D237CAD1E0081388D /* DateDropdownEntryField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ABD136C237CAD1E0081388D /* DateDropdownEntryField.swift */; }; 0ABD1371237DB0450081388D /* ItemDropdownEntryField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ABD1370237DB0450081388D /* ItemDropdownEntryField.swift */; }; 0AE14F64238315D2005417F8 /* TextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE14F63238315D2005417F8 /* TextField.swift */; }; @@ -450,6 +452,8 @@ 0A8321AE2355FE9500CB7F00 /* DigitBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DigitBox.swift; sourceTree = ""; }; 0AA33B33239813C50067DD0F /* UIColor+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extension.swift"; sourceTree = ""; }; 0AA33B392398524F0067DD0F /* Toggle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Toggle.swift; sourceTree = ""; }; + 0AAF8E29240EA57D008DD263 /* BarsCarouselIndicatorModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BarsCarouselIndicatorModel.swift; sourceTree = ""; }; + 0AAF8E2B240EA594008DD263 /* NumericCarouselIndicatorModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumericCarouselIndicatorModel.swift; sourceTree = ""; }; 0ABD136C237CAD1E0081388D /* DateDropdownEntryField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateDropdownEntryField.swift; sourceTree = ""; }; 0ABD1370237DB0450081388D /* ItemDropdownEntryField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemDropdownEntryField.swift; sourceTree = ""; }; 0AE14F63238315D2005417F8 /* TextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = ""; }; @@ -791,20 +795,14 @@ 0A14F6B023E8C27A00EDF7F7 /* CarouselIndicator */ = { isa = PBXGroup; children = ( - 0A14F6B723ECA7F900EDF7F7 /* IndicatorViews */, 0A14F69223E349EF00EDF7F7 /* CarouselIndicator.swift */, 0A14F6A823E8750300EDF7F7 /* CarouselIndicatorModel.swift */, - ); - path = CarouselIndicator; - sourceTree = ""; - }; - 0A14F6B723ECA7F900EDF7F7 /* IndicatorViews */ = { - isa = PBXGroup; - children = ( + 0AAF8E29240EA57D008DD263 /* BarsCarouselIndicatorModel.swift */, 0A4253AE23F5C2C000554656 /* BarsIndicatorView.swift */, + 0AAF8E2B240EA594008DD263 /* NumericCarouselIndicatorModel.swift */, 0A14F6B323E8C29700EDF7F7 /* NumericIndicatorView.swift */, ); - path = IndicatorViews; + path = CarouselIndicator; sourceTree = ""; }; 0A5D59C323AD488600EFD9E9 /* Protocols */ = { @@ -1096,7 +1094,6 @@ isa = PBXGroup; children = ( 525019E3240684E500EED91C /* FourColumn */, - 52267A0523FFE0A900906CBA /* OneColumn */, D22B38ED23F4E11100490EF6 /* ThreeColumn */, ); path = SectionDividers; @@ -1810,6 +1807,7 @@ 0103B84E23D7E33A009C315C /* HeadlineBodyToggleModel.swift in Sources */, D2755D7B23689C7500485468 /* TableViewCell.swift in Sources */, 0A21DB85235E06EF00C160A2 /* MFTextField.m in Sources */, + 0AAF8E2C240EA594008DD263 /* NumericCarouselIndicatorModel.swift in Sources */, 014AA72623C501E2006F3E93 /* ContainerModelProtocol.swift in Sources */, AA11A42123F15D7000D7962F /* ListRightVariablePaymentsModel.swift in Sources */, 01EB369223609801006832FA /* MoleculeStackModel.swift in Sources */, @@ -1995,6 +1993,7 @@ C6FA7D5223C77A4A00A3614A /* UnOrderedList.swift in Sources */, 01509D8F2327EC6F00EF99AA /* MoleculeTableViewCell.swift in Sources */, 0105618D224BBE7700E1557D /* FormValidator.swift in Sources */, + 0AAF8E2A240EA57D008DD263 /* BarsCarouselIndicatorModel.swift in Sources */, 01509D912327ECE600EF99AA /* CornerLabels.swift in Sources */, D22D1F1B220341F60077CEC0 /* MVMCoreUICheckBox.m in Sources */, C695A69823C990C200BFB94E /* DoughnutChartView.swift in Sources */, diff --git a/MVMCoreUI/Atoms/Views/CarouselIndicator/BarsCarouselIndicatorModel.swift b/MVMCoreUI/Atoms/Views/CarouselIndicator/BarsCarouselIndicatorModel.swift new file mode 100644 index 00000000..70ddac66 --- /dev/null +++ b/MVMCoreUI/Atoms/Views/CarouselIndicator/BarsCarouselIndicatorModel.swift @@ -0,0 +1,43 @@ +// +// BarsCarouselIndicatorModel.swift +// MVMCoreUI +// +// Created by Kevin Christiano on 3/3/20. +// Copyright © 2020 Verizon Wireless. All rights reserved. +// + +import UIKit +/* +open class BarsCarouselIndicatorModel: CarouselIndicatorModel { + //-------------------------------------------------- + // MARK: - Properties + //-------------------------------------------------- + + public class var identifier: String { + return "barsCarouselIndicator" + } + + //-------------------------------------------------- + // MARK: - Keys + //-------------------------------------------------- + + private enum CodingKeys: String, CodingKey { + case moleculeName + case backgroundColor + + } + + //-------------------------------------------------- + // MARK: - Codec + //-------------------------------------------------- + + required public init(from decoder: Decoder) throws { + let typeContainer = try decoder.container(keyedBy: CodingKeys.self) + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + } +} +*/ diff --git a/MVMCoreUI/Atoms/Views/CarouselIndicator/IndicatorViews/BarsIndicatorView.swift b/MVMCoreUI/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift similarity index 88% rename from MVMCoreUI/Atoms/Views/CarouselIndicator/IndicatorViews/BarsIndicatorView.swift rename to MVMCoreUI/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift index 69c34895..936a971a 100644 --- a/MVMCoreUI/Atoms/Views/CarouselIndicator/IndicatorViews/BarsIndicatorView.swift +++ b/MVMCoreUI/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift @@ -9,7 +9,7 @@ import UIKit -open class BarsIndicatorView: View, IndicatorViewProtocol { +open class BarsIndicatorView: CarouselIndicator { //-------------------------------------------------- // MARK: - Stored Properties //-------------------------------------------------- @@ -37,15 +37,15 @@ open class BarsIndicatorView: View, IndicatorViewProtocol { public var parentCarouselIndicator: CarouselIndicator? { return superview as? CarouselIndicator } - - open var isEnabled: Bool = true { - didSet { - barReferences.forEach { view, heightConstraint in - view.backgroundColor = isEnabled ? parentCarouselIndicator?.indicatorTintColor ?? .mvmBlack : parentCarouselIndicator?.disabledIndicatorColor ?? .mvmCoolGray3 - } - } - } - +// +// open override var isEnabled: Bool = true { +// didSet { +// barReferences.forEach { view, heightConstraint in +// view.backgroundColor = isEnabled ? parentCarouselIndicator?.indicatorTintColor ?? .mvmBlack : parentCarouselIndicator?.disabledIndicatorColor ?? .mvmCoolGray3 +// } +// } +// } +// //-------------------------------------------------- // MARK: - Initializers //-------------------------------------------------- @@ -89,7 +89,7 @@ open class BarsIndicatorView: View, IndicatorViewProtocol { for i in 0.. = [] /// The currently active indicator view. - public var currentIndicator: IndicatorView? +// public var currentIndicator: IndicatorView? /// Convenience to access the model. public var carouselIndicatorModel: CarouselIndicatorModel? { @@ -57,25 +57,25 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { } /// The view control relative to the state of the indicator type. - private(set) var indicatorView: IndicatorView? { - willSet { indicatorView?.removeFromSuperview() } - didSet { - indicatorView?.removeFromSuperview() - - guard let indicatorView = indicatorView else { return } - addSubview(indicatorView) - - topConstraint = indicatorView.topAnchor.constraint(equalTo: topAnchor, constant: PaddingTwo) - topConstraint?.isActive = true - - bottomConstraint = bottomAnchor.constraint(equalTo: indicatorView.bottomAnchor, constant: PaddingTwo) - bottomConstraint?.isActive = true - - indicatorView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true - trailingAnchor.constraint(equalTo: indicatorView.trailingAnchor).isActive = true - updateUI() - } - } +// private(set) var indicatorView: IndicatorView? { +// willSet { indicatorView?.removeFromSuperview() } +// didSet { +// indicatorView?.removeFromSuperview() +// +// guard let indicatorView = indicatorView else { return } +// addSubview(indicatorView) +// +// topConstraint = indicatorView.topAnchor.constraint(equalTo: topAnchor, constant: PaddingTwo) +// topConstraint?.isActive = true +// +// bottomConstraint = bottomAnchor.constraint(equalTo: indicatorView.bottomAnchor, constant: PaddingTwo) +// bottomConstraint?.isActive = true +// +// indicatorView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true +// trailingAnchor.constraint(equalTo: indicatorView.trailingAnchor).isActive = true +// updateUI() +// } +// } /// Set this closure to perform an action when a different indicator was selected. /// Passes through oldInde and newIndex, respectively. @@ -84,7 +84,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { public override var isEnabled: Bool { didSet { isUserInteractionEnabled = isEnabled - indicatorView?.isEnabled = isEnabled +// indicatorView?.isEnabled = isEnabled } } @@ -118,9 +118,9 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { isHidden = carouselIndicatorModel?.hidesForSinglePage ?? false && newTotal <= 1 - if isBarIndicator() { - (indicatorView as? BarsIndicatorView)?.generateBars() - } +// if isBarIndicator() { +// (indicatorView as? BarsIndicatorView)?.generateBars() +// } updateUI() } @@ -135,11 +135,11 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { set (newColor) { carouselIndicatorModel?.indicatorColor = Color(uiColor: newColor) - if isBarIndicator(), let barIndicator = indicatorView as? BarsIndicatorView { - for (i, barTuple) in barIndicator.barReferences.enumerated() where i != currentIndex { - barTuple.view.backgroundColor = newColor - } - } +// if isBarIndicator(), let barIndicator = indicatorView as? BarsIndicatorView { +// for (i, barTuple) in barIndicator.barReferences.enumerated() where i != currentIndex { +// barTuple.view.backgroundColor = newColor +// } +// } } } @@ -152,11 +152,11 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { _currentIndicatorColor = newColor carouselIndicatorModel?.currentIndicatorColor = Color(uiColor: newColor) - if isBarIndicator() { - if let barIndicator = indicatorView as? BarsIndicatorView, !barIndicator.barReferences.isEmpty { - barIndicator.barReferences[currentIndex].view.backgroundColor = newColor - } - } +// if isBarIndicator() { +// if let barIndicator = indicatorView as? BarsIndicatorView, !barIndicator.barReferences.isEmpty { +// barIndicator.barReferences[currentIndex].view.backgroundColor = newColor +// } +// } } } @@ -172,10 +172,10 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { self.init(frame: .zero) } - public init(indicatorType: IndicatorType) { - self.indicatorType = indicatorType - super.init(frame: .zero) - } +// public init(indicatorType: IndicatorType) { +// self.indicatorType = indicatorType +// super.init(frame: .zero) +// } required public init?(coder: NSCoder) { super.init(coder: coder) @@ -195,7 +195,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { open override func setupView() { super.setupView() - assignIndicatorView() +// assignIndicatorView() setupGestures() } @@ -245,17 +245,17 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { let touchPoint = tapGesture?.location(in: self) let touchPoint_X = touchPoint?.x ?? 0.0 - if isBarIndicator(), let bars = (indicatorView as? BarsIndicatorView)?.barReferences { - currentIndex = bars.firstIndex { $0.0.frame.maxX >= touchPoint_X && $0.0.frame.minX <= touchPoint_X } ?? 0 - - } else { - // Determine which half of the view was touched. - if touchPoint_X > bounds.width / 2 { - incrementCurrentIndex() - } else { - decrementCurrentIndex() - } - } +// if isBarIndicator(), let bars = (indicatorView as? BarsIndicatorView)?.barReferences { +// currentIndex = bars.firstIndex { $0.0.frame.maxX >= touchPoint_X && $0.0.frame.minX <= touchPoint_X } ?? 0 +// +// } else { +// // Determine which half of the view was touched. +// if touchPoint_X > bounds.width / 2 { +// incrementCurrentIndex() +// } else { +// decrementCurrentIndex() +// } +// } } //-------------------------------------------------- @@ -264,10 +264,10 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { public func updateUI() { - indicatorView?.updateUI(previousIndex: previousIndex, - newIndex: currentIndex, - totalCount: numberOfPages, - isAnimated: carouselIndicatorModel?.isAnimated ?? true) +// indicatorView?.updateUI(previousIndex: previousIndex, +// newIndex: currentIndex, +// totalCount: numberOfPages, +// isAnimated: carouselIndicatorModel?.isAnimated ?? true) } public func performAction() { @@ -277,25 +277,25 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { } /// Sets the indicatorView based on the current indicatorType. - func assignIndicatorView() { - - switch indicatorType { - case .bars: - indicatorView = BarsIndicatorView() - - case .numeric: - indicatorView = NumericIndicatorView() - - case .hybrid: - - indicatorView = numberOfPages >= carouselIndicatorModel?.hybridThreshold ?? 0 ? NumericIndicatorView() : BarsIndicatorView() - } - } +// func assignIndicatorView() { +// +// switch indicatorType { +// case .bars: +// indicatorView = BarsIndicatorView() +// +// case .numeric: +// indicatorView = NumericIndicatorView() +// +// case .hybrid: +// +// indicatorView = numberOfPages >= carouselIndicatorModel?.hybridThreshold ?? 0 ? NumericIndicatorView() : BarsIndicatorView() +// } +// } /// Convenience to determine if current view is displaying bars. - func isBarIndicator() -> Bool { - return indicatorType == .bars || indicatorType == .hybrid && numberOfPages <= carouselIndicatorModel?.hybridThreshold ?? 5 - } +// func isBarIndicator() -> Bool { +// return indicatorType == .bars || indicatorType == .hybrid && numberOfPages <= carouselIndicatorModel?.hybridThreshold ?? 5 +// } public func scrollViewDidScroll(_ collectionView: UICollectionView) { } @@ -309,7 +309,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { super.set(with: model, delegateObject, additionalData) - indicatorType = IndicatorType(rawValue: model.type) ?? .hybrid +// indicatorType = IndicatorType(rawValue: model.type) ?? .hybrid currentIndicatorColor = model.currentIndicatorColor.uiColor indicatorTintColor = model.indicatorColor.uiColor isEnabled = model.isEnabled diff --git a/MVMCoreUI/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift b/MVMCoreUI/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift index 051f25ec..b395b1b5 100644 --- a/MVMCoreUI/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift +++ b/MVMCoreUI/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift @@ -14,8 +14,8 @@ public class CarouselIndicatorModel: CarouselPagingModelProtocol { // MARK: - Properties //-------------------------------------------------- - public static var identifier: String { - return "carouselIndicator" + public class var identifier: String { + return "" } public var backgroundColor: Color? @@ -23,7 +23,7 @@ public class CarouselIndicatorModel: CarouselPagingModelProtocol { public var type: String = "hybrid" /// The maxmum count of pages before the indicatorView forces a Numeric Indicator in place of Bar. - public var hybridThreshold: Int = 5 +// public var hybridThreshold: Int = 5 public var numberOfPages: Int = 0 public var isAnimated: Bool = true public var hidesForSinglePage: Bool = false @@ -46,7 +46,7 @@ public class CarouselIndicatorModel: CarouselPagingModelProtocol { case moleculeName case backgroundColor case type - case hybridThreshold +// case hybridThreshold case numberOfPages case alwaysSendAction case isAnimated @@ -72,9 +72,9 @@ public class CarouselIndicatorModel: CarouselPagingModelProtocol { self.type = type } - if let hybridThreshold = try typeContainer.decodeIfPresent(Int.self, forKey: .hybridThreshold) { - self.hybridThreshold = hybridThreshold - } +// if let hybridThreshold = try typeContainer.decodeIfPresent(Int.self, forKey: .hybridThreshold) { +// self.hybridThreshold = hybridThreshold +// } if let numberOfPages = try typeContainer.decodeIfPresent(Int.self, forKey: .numberOfPages) { self.numberOfPages = numberOfPages @@ -122,7 +122,7 @@ public class CarouselIndicatorModel: CarouselPagingModelProtocol { try container.encode(moleculeName, forKey: .moleculeName) try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor) try container.encodeIfPresent(type, forKey: .type) - try container.encodeIfPresent(hybridThreshold, forKey: .hybridThreshold) +// try container.encodeIfPresent(hybridThreshold, forKey: .hybridThreshold) try container.encodeIfPresent(numberOfPages, forKey: .numberOfPages) try container.encodeIfPresent(alwaysSendAction, forKey: .alwaysSendAction) try container.encodeIfPresent(isAnimated, forKey: .isAnimated) diff --git a/MVMCoreUI/Atoms/Views/CarouselIndicator/NumericCarouselIndicatorModel.swift b/MVMCoreUI/Atoms/Views/CarouselIndicator/NumericCarouselIndicatorModel.swift new file mode 100644 index 00000000..1898c05c --- /dev/null +++ b/MVMCoreUI/Atoms/Views/CarouselIndicator/NumericCarouselIndicatorModel.swift @@ -0,0 +1,42 @@ +// +// NumericCarouselIndicatorModel.swift +// MVMCoreUI +// +// Created by Kevin Christiano on 3/3/20. +// Copyright © 2020 Verizon Wireless. All rights reserved. +// + +import UIKit +/* +class NumericCarouselIndicatorModel: CarouselIndicatorModel { + //-------------------------------------------------- + // MARK: - Properties + //-------------------------------------------------- + + public class var identifier: String { + return "numericCarouselIndicator" + } + + //-------------------------------------------------- + // MARK: - Keys + //-------------------------------------------------- + + private enum CodingKeys: String, CodingKey { + + } + + //-------------------------------------------------- + // MARK: - Codec + //-------------------------------------------------- + + required public init(from decoder: Decoder) throws { + let typeContainer = try decoder.container(keyedBy: CodingKeys.self) + + } + + public override func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + + } +} +*/ diff --git a/MVMCoreUI/Atoms/Views/CarouselIndicator/IndicatorViews/NumericIndicatorView.swift b/MVMCoreUI/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift similarity index 85% rename from MVMCoreUI/Atoms/Views/CarouselIndicator/IndicatorViews/NumericIndicatorView.swift rename to MVMCoreUI/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift index 41be20cd..9bd31aa7 100644 --- a/MVMCoreUI/Atoms/Views/CarouselIndicator/IndicatorViews/NumericIndicatorView.swift +++ b/MVMCoreUI/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift @@ -9,7 +9,7 @@ import UIKit -open class NumericIndicatorView: View, IndicatorViewProtocol { +open class NumericIndicatorView: CarouselIndicator { //-------------------------------------------------- // MARK: - Outlets //-------------------------------------------------- @@ -42,15 +42,15 @@ open class NumericIndicatorView: View, IndicatorViewProtocol { return superview as? CarouselIndicator } - open var isEnabled: Bool = true { - didSet { - let enabledColor = parentCarouselIndicator?.indicatorTintColor ?? .mvmBlack - let disabledColor = parentCarouselIndicator?.disabledIndicatorColor ?? .mvmCoolGray3 - pageCount.textColor = isEnabled ? enabledColor : disabledColor - leftArrow.tintColor = isEnabled ? enabledColor : disabledColor - rightArrow.tintColor = isEnabled ? enabledColor : disabledColor - } - } +// open var isEnabled: Bool = true { +// didSet { +// let enabledColor = parentCarouselIndicator?.indicatorTintColor ?? .mvmBlack +// let disabledColor = parentCarouselIndicator?.disabledIndicatorColor ?? .mvmCoolGray3 +// pageCount.textColor = isEnabled ? enabledColor : disabledColor +// leftArrow.tintColor = isEnabled ? enabledColor : disabledColor +// rightArrow.tintColor = isEnabled ? enabledColor : disabledColor +// } +// } //-------------------------------------------------- // MARK: - Initializers