Minor fixes
This commit is contained in:
parent
692689a900
commit
5cecd5f031
@ -896,9 +896,9 @@
|
||||
D224798F2316A99F003FCCF9 /* LeftRightViews */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D2E2A99723D8D63C000B42E6 /* ActionDetailWithImageModel.swift */,
|
||||
8D24041023E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift */,
|
||||
8D24041423E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift */,
|
||||
8D24041023E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift */,
|
||||
D2E2A99723D8D63C000B42E6 /* ActionDetailWithImageModel.swift */,
|
||||
0A12149F22C11A17007C7030 /* ActionDetailWithImage.swift */,
|
||||
D28A839023CD4FD400DFE4FC /* CornerLabelsModel.swift */,
|
||||
01509D902327ECE600EF99AA /* CornerLabels.swift */,
|
||||
|
||||
@ -14,10 +14,11 @@ import UIKit
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Outlets
|
||||
//-------------------------------------------------------
|
||||
let leftImage = MFLoadImageView()
|
||||
let leftImage = MFLoadImageView(pinnedEdges: .all)
|
||||
let leftLabel = Label.commonLabelB2(true)
|
||||
let rightLabel = Label.commonLabelB2(true)
|
||||
let stack = Stack<StackModel>(frame: .zero)
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - View Lifecycle
|
||||
//-------------------------------------------------------
|
||||
@ -38,6 +39,7 @@ import UIKit
|
||||
leftLabel.setContentHuggingPriority(UILayoutPriority(rawValue: 901), for: .horizontal)
|
||||
rightLabel.setContentHuggingPriority(UILayoutPriority(rawValue: 902), for: .horizontal)
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
// MARK: - Molecule
|
||||
//------------------------------------------------------
|
||||
@ -65,4 +67,8 @@ import UIKit
|
||||
stack.model = stackModel
|
||||
stack.restack()
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return 90
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,6 +37,7 @@ public class ListLeftVariableIconWithRightCaretModel: ContainerModel, ListItemMo
|
||||
self.leftLabel = leftLabel
|
||||
self.rightLabel = rightLabel
|
||||
super.init()
|
||||
setDefaults()
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
@ -45,6 +46,7 @@ public class ListLeftVariableIconWithRightCaretModel: ContainerModel, ListItemMo
|
||||
case rightLabel
|
||||
case image
|
||||
case action
|
||||
case backgroundColor
|
||||
}
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
@ -53,6 +55,7 @@ public class ListLeftVariableIconWithRightCaretModel: ContainerModel, ListItemMo
|
||||
rightLabel = try typeContainer.decode(LabelModel.self, forKey: .rightLabel)
|
||||
image = try typeContainer.decode(ImageViewModel.self, forKey: .image)
|
||||
action = try typeContainer.decodeModelIfPresent(codingKey: .action, typeCodingKey: ActionCodingKey.actionType)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
try super.init(from: decoder)
|
||||
setDefaults()
|
||||
}
|
||||
@ -60,10 +63,11 @@ public class ListLeftVariableIconWithRightCaretModel: ContainerModel, ListItemMo
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(ListLeftVariableIconWithRightCaretModel.identifier, forKey: .moleculeName)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encode(leftLabel, forKey: .leftLabel)
|
||||
try container.encode(rightLabel, forKey: .rightLabel)
|
||||
try container.encode(image, forKey: .image)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encodeModelIfPresent(action, forKey: .action)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user