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