diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift index 8ac95ed0..89a06e9e 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift @@ -74,18 +74,6 @@ open class BarsIndicatorView: CarouselIndicator { } } - //-------------------------------------------------- - // MARK: - Initializers - //-------------------------------------------------- - - public init() { - super.init(frame: .zero) - } - - public required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - //-------------------------------------------------- // MARK: - Setup //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift index 75e5ed58..206e67de 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicatorModel.swift @@ -9,7 +9,7 @@ import Foundation -open class CarouselIndicatorModel: CarouselPagingModelProtocol { +open class CarouselIndicatorModel: CarouselPagingModelProtocol, MoleculeModelProtocol { //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift index 8cd9e05c..12d350e0 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift @@ -60,22 +60,6 @@ open class NumericIndicatorView: CarouselIndicator { } } - //-------------------------------------------------- - // MARK: - Initializers - //-------------------------------------------------- - - public override init(frame: CGRect) { - super.init(frame: .zero) - } - - public convenience init() { - self.init(frame: .zero) - } - - public required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - //-------------------------------------------------- // MARK: - Lifecycle //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Organisms/Carousel.swift b/MVMCoreUI/Atomic/Organisms/Carousel.swift index a45eaf72..7e529ae2 100644 --- a/MVMCoreUI/Atomic/Organisms/Carousel.swift +++ b/MVMCoreUI/Atomic/Organisms/Carousel.swift @@ -125,7 +125,7 @@ open class Carousel: View { collectionViewHeight?.isActive = true } - setupPagingMolecule(carouselModel.pagingMolecule, delegateObject: delegateObject) + setupPagingMolecule((carouselModel.pagingMolecule as! (CarouselPagingModelProtocol & MoleculeModelProtocol)), delegateObject: delegateObject) collectionView.reloadData() } @@ -174,7 +174,7 @@ open class Carousel: View { } /// Sets up the paging molecule - open func setupPagingMolecule(_ molecule: CarouselPagingModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) { + open func setupPagingMolecule(_ molecule: (MoleculeModelProtocol & CarouselPagingModelProtocol)?, delegateObject: MVMCoreUIDelegateObject?) { var pagingView: (UIView & CarouselPageControlProtocol)? = nil diff --git a/MVMCoreUI/Atomic/Organisms/CarouselModel.swift b/MVMCoreUI/Atomic/Organisms/CarouselModel.swift index b117b4ba..6f7d1a88 100644 --- a/MVMCoreUI/Atomic/Organisms/CarouselModel.swift +++ b/MVMCoreUI/Atomic/Organisms/CarouselModel.swift @@ -27,7 +27,7 @@ import UIKit public var height: Float? public var itemWidthPercent: Float? public var itemAlignment: UICollectionView.ScrollPosition? - public var pagingMolecule: CarouselPagingModelProtocol? + public var pagingMolecule: MoleculeModelProtocol? //-------------------------------------------------- // MARK: - Initializer diff --git a/MVMCoreUI/Atomic/Protocols/ModelProtocols/CarouselPagingModelProtocol.swift b/MVMCoreUI/Atomic/Protocols/ModelProtocols/CarouselPagingModelProtocol.swift index 94b1277a..72138290 100644 --- a/MVMCoreUI/Atomic/Protocols/ModelProtocols/CarouselPagingModelProtocol.swift +++ b/MVMCoreUI/Atomic/Protocols/ModelProtocols/CarouselPagingModelProtocol.swift @@ -9,6 +9,6 @@ import Foundation -public protocol CarouselPagingModelProtocol: MoleculeModelProtocol { +public protocol CarouselPagingModelProtocol { var position: Float? { get } }