This commit is contained in:
Pfeil, Scott Robert 2019-11-25 09:06:09 -05:00
parent dd85a134ac
commit d884602d87
5 changed files with 11 additions and 10 deletions

View File

@ -35,7 +35,6 @@
01EB3684236097C0006832FA /* MoleculeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB3683236097C0006832FA /* MoleculeProtocol.swift */; };
01EB368F23609801006832FA /* LabelModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368823609801006832FA /* LabelModel.swift */; };
01EB369023609801006832FA /* ListItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368923609801006832FA /* ListItemModel.swift */; };
01EB369123609801006832FA /* MoleculeStackItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368A23609801006832FA /* MoleculeStackItemModel.swift */; };
01EB369223609801006832FA /* MoleculeStackModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368B23609801006832FA /* MoleculeStackModel.swift */; };
01EB369323609801006832FA /* HeaderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368C23609801006832FA /* HeaderModel.swift */; };
01EB369423609801006832FA /* HeadlineBodyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368D23609801006832FA /* HeadlineBodyModel.swift */; };
@ -67,6 +66,7 @@
D260D7B122D65BDD007E7233 /* MVMCoreUIPageControl.h in Headers */ = {isa = PBXBuildFile; fileRef = D260D7AF22D65BDD007E7233 /* MVMCoreUIPageControl.h */; settings = {ATTRIBUTES = (Public, ); }; };
D260D7B222D65BDD007E7233 /* MVMCoreUIPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = D260D7B022D65BDD007E7233 /* MVMCoreUIPageControl.m */; };
D260D7B622D68514007E7233 /* MVMCoreUIPagingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D260D7B522D68509007E7233 /* MVMCoreUIPagingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
D268C70C2386DFFD007F2C1C /* MoleculeStackItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368A23609801006832FA /* MoleculeStackItemModel.swift */; };
D274CA332236A78900B01B62 /* StandardFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D274CA322236A78900B01B62 /* StandardFooterView.swift */; };
D2755D7B23689C7500485468 /* TableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2755D7A23689C7500485468 /* TableViewCell.swift */; };
D27CD40E2322EEAF00C1DC07 /* TabsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D27CD40D2322EEAF00C1DC07 /* TabsTableViewCell.swift */; };
@ -1179,6 +1179,7 @@
D213347723843825008E41B3 /* Line.swift in Sources */,
D2A514672213885800345BFB /* StandardHeaderView.swift in Sources */,
01EB369023609801006832FA /* ListItemModel.swift in Sources */,
D268C70C2386DFFD007F2C1C /* MoleculeStackItemModel.swift in Sources */,
DBEFFA04225A829700230692 /* Label.swift in Sources */,
D2D6CD4022E78C1A00D701B8 /* Scroller.swift in Sources */,
01509D952327ED1900EF99AA /* HeadlineBodyTextButtonSwitch.swift in Sources */,

View File

@ -212,7 +212,7 @@ public typealias ActionBlock = () -> ()
}
@objc public static func setUILabel(_ label: UILabel?, withJSON json: [AnyHashable: Any]?, delegate: DelegateObject?, additionalData: [AnyHashable: Any]?) {
//LabelModel()
guard let label = label else { return }
label.attributedText = nil
label.text = json?.optionalStringForKey(KeyText)

View File

@ -8,7 +8,7 @@
import Foundation
extension KeyedDecodingContainer where Key : CodingKey{
extension KeyedDecodingContainer where Key : CodingKey {
private enum TypeCodingKey: String, CodingKey {
case moleculeName
}

View File

@ -12,31 +12,31 @@ import Foundation
public static var identifier: String = "listItem"
public var moleculeName: String?
public var molecule: MoleculeProtocol?
public var actionMap: ActionMapModel?
public var action: ActionModel?
public init(molecule: MoleculeProtocol?, actionMap: ActionMapModel?) {
public init(molecule: MoleculeProtocol?, actionMap: ActionModel?) {
self.molecule = molecule
self.actionMap = actionMap
self.action = actionMap
self.moleculeName = Self.identifier
}
enum CodingKeys: String, CodingKey {
case moleculeName
case molecule
case actionMap
case action
}
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
self.moleculeName = try typeContainer.decode(String.self, forKey: .moleculeName)
self.molecule = try typeContainer.decodeIfPresent(codingKey: .molecule)
self.actionMap = try typeContainer.decodeIfPresent(ActionMapModel.self, forKey: .actionMap)
self.action = try typeContainer.decodeIfPresent(ActionModel.self, forKey: .action)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName)
try container.encodeIfPresent(self.molecule, forKey: .molecule)
try container.encodeIfPresent(actionMap, forKey: .actionMap)
try container.encodeIfPresent(action, forKey: .action)
}
}

View File

@ -58,7 +58,7 @@ public class StandardHeaderView: ViewConstrainingView, ModelMoleculeViewProtocol
}
if let seperatorModel = headerModel.seperator as? LineModel {
separatorView?.setWithJSON(seperatorModel.toJSON(), delegateObject: delegateObject, additionalData: additionalData)
line?.setWithJSON(seperatorModel.toJSON(), delegateObject: delegateObject, additionalData: additionalData)
}
}