From 7c70b0a4a10813fd4e9ed1035935120118cf98c5 Mon Sep 17 00:00:00 2001 From: "Suresh, Kamlesh" Date: Wed, 22 Jan 2020 15:32:31 -0500 Subject: [PATCH] remove methods --- .../Atoms/Views/CheckboxLabelModel.swift | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/MVMCoreUI/Atoms/Views/CheckboxLabelModel.swift b/MVMCoreUI/Atoms/Views/CheckboxLabelModel.swift index 79d2ecb3..d7ceae36 100644 --- a/MVMCoreUI/Atoms/Views/CheckboxLabelModel.swift +++ b/MVMCoreUI/Atoms/Views/CheckboxLabelModel.swift @@ -9,6 +9,7 @@ import Foundation public enum CheckboxPosition: String, Codable { + case left case center case top case bottom @@ -21,24 +22,4 @@ public enum CheckboxPosition: String, Codable { public var checkboxAlignment: CheckboxPosition? public var checkbox: CheckboxModel public var label: LabelModel - - enum CodingKeys: String, CodingKey { - case checkboxAlignment - case checkbox - case label - } - - required public init(from decoder: Decoder) throws { - let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - self.checkboxAlignment = try typeContainer.decodeIfPresent(CheckboxPosition.self, forKey: .checkboxAlignment) - self.checkbox = try typeContainer.decode(CheckboxModel.self, forKey: .checkbox) - self.label = try typeContainer.decode(LabelModel.self, forKey: .label) - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(checkboxAlignment, forKey: .checkboxAlignment) - try container.encode(checkbox, forKey: .checkbox) - try container.encode(label, forKey: .label) - } }