revised due to registry limitations

This commit is contained in:
Kevin G Christiano 2020-03-31 10:21:42 -04:00
parent 94a8ac405e
commit 2e41876006
6 changed files with 5 additions and 33 deletions

View File

@ -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
//--------------------------------------------------

View File

@ -9,7 +9,7 @@
import Foundation
open class CarouselIndicatorModel: CarouselPagingModelProtocol {
open class CarouselIndicatorModel: CarouselPagingModelProtocol, MoleculeModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------

View File

@ -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
//--------------------------------------------------

View File

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

View File

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

View File

@ -9,6 +9,6 @@
import Foundation
public protocol CarouselPagingModelProtocol: MoleculeModelProtocol {
public protocol CarouselPagingModelProtocol {
var position: Float? { get }
}