latest state

This commit is contained in:
Kevin G Christiano 2020-05-05 09:00:47 -04:00
parent 3347f4a0af
commit 8b05b20f51
4 changed files with 25 additions and 17 deletions

View File

@ -78,11 +78,11 @@ open class Arrow: View {
super.init(frame: frame)
}
public convenience init(model: ArrowModel, degrees: Float = 0) {
self.init(frame: .zero)
self.model = model
arrowModel?.degrees = degrees
}
// public convenience init(degrees: Float = 0) {
// self.init(frame: .zero)
// self.model = ArrowModel()
// arrowModel?.degrees = degrees
// }
public required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")

View File

@ -24,14 +24,14 @@ open class NumericIndicatorView: CarouselIndicator {
}()
let leftArrow: Arrow = {
let arrow = Arrow(model: ArrowModel(), degrees: 180)
let arrow = Arrow(model: ArrowModel(), nil, nil)
arrow.isAccessibilityElement = false
arrow.pinHeightAndWidth()
return arrow
}()
let rightArrow: Arrow = {
let arrow = Arrow(model: ArrowModel())
let arrow = Arrow()
arrow.pinHeightAndWidth()
return arrow
}()

View File

@ -8,7 +8,12 @@
import UIKit
@objcMembers open class View: UIView, MoleculeViewProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
open var model: MoleculeModelProtocol?
private var initialSetupPerformed = false
@ -38,7 +43,10 @@ import UIKit
}
}
//--------------------------------------------------
// MARK: - MoleculeViewProtocol
//--------------------------------------------------
open func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
self.model = model
if let backgroundColor = model.backgroundColor {