Minor fixs
This commit is contained in:
parent
c7344b166d
commit
dccf576f7a
@ -1016,6 +1016,13 @@
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D20492F12434CB5F00A5EED6 /* FourColumn */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = FourColumn;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D213347423842FE3008E41B3 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -1213,6 +1220,7 @@
|
||||
D22B38EA23F4E08B00490EF6 /* List */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D20492F12434CB5F00A5EED6 /* FourColumn */,
|
||||
D22D8396241FDE4700D3DF69 /* TwoColumn */,
|
||||
52267A0523FFE0A900906CBA /* OneColumn */,
|
||||
AA4FC2A323F4F69600E251DB /* RightVariable */,
|
||||
|
||||
@ -29,7 +29,7 @@ import Foundation
|
||||
(view: label2, model: StackItemModel(percent: 40, horizontalAlignment: .leading)),
|
||||
(view: label3, model: StackItemModel(percent:17,horizontalAlignment: .leading)),
|
||||
(view: label4, model: StackItemModel(percent:20,horizontalAlignment: .leading))],
|
||||
axis: .horizontal,spacing: 2)
|
||||
axis: .horizontal,spacing: 8)
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ import Foundation
|
||||
super.setupView()
|
||||
addMolecule(stack)
|
||||
arrow.pinHeightAndWidth()
|
||||
stack.restack()
|
||||
}
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
@ -54,7 +55,6 @@ import Foundation
|
||||
label3.set(with: model.label3, delegateObject, additionalData)
|
||||
label4.set(with: model.label4, delegateObject, additionalData)
|
||||
arrow.set(with: model.arrow, delegateObject, additionalData)
|
||||
stack.restack()
|
||||
}
|
||||
|
||||
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
@ -67,6 +67,5 @@ import Foundation
|
||||
label2.styleB2(true)
|
||||
label3.styleB2(true)
|
||||
label4.styleB2(true)
|
||||
arrow.reset()
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,13 +9,12 @@
|
||||
import Foundation
|
||||
|
||||
public class ListFourColumnDataUsageListItemModel: ListItemModel, MoleculeModelProtocol {
|
||||
|
||||
public static var identifier: String = "list4C"
|
||||
public var label1: LabelModel
|
||||
public var arrow: ArrowModel
|
||||
public var label2: LabelModel
|
||||
public var label3: LabelModel
|
||||
public var label4: LabelModel
|
||||
public var arrow: ArrowModel
|
||||
|
||||
public init(label1:LabelModel, label2:LabelModel, label3:LabelModel,label4:LabelModel, arrow:ArrowModel) {
|
||||
self.label1 = label1
|
||||
@ -26,12 +25,6 @@ public class ListFourColumnDataUsageListItemModel: ListItemModel, MoleculeModelP
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func setDefaults() {
|
||||
super.setDefaults()
|
||||
style = "header"
|
||||
arrow.degrees = 50
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case label1
|
||||
|
||||
@ -8,13 +8,15 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension UIStackView: MoleculeViewProtocol {
|
||||
extension UIStackView: MVMCoreViewProtocol {
|
||||
public func updateView(_ size: CGFloat) {
|
||||
for view in arrangedSubviews {
|
||||
(view as? MVMCoreViewProtocol)?.updateView(size)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension UIStackView: MoleculeViewProtocol {
|
||||
public func reset() {
|
||||
for view in arrangedSubviews {
|
||||
(view as? MoleculeViewProtocol)?.reset()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user