From 33ad5a3630c832d69c29aea7e7d4e5e3c9935025 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 21 Jun 2022 15:11:42 -0500 Subject: [PATCH] added override intializer for subclasses Signed-off-by: Matt Bruce --- .../Atoms/FormFields/TextFields/TextEntryFieldModel.swift | 8 ++++++++ .../Atoms/Views/Label/LabelAttributeFontModel.swift | 8 ++++++++ .../Atoms/Views/Label/LabelAttributeImageModel.swift | 8 ++++++++ .../HeadersAndFooters/MoleculeSectionHeaderModel.swift | 7 +++++++ .../Atomic/Templates/ModalListPageTemplateModel.swift | 8 ++++++++ 5 files changed, 39 insertions(+) diff --git a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextEntryFieldModel.swift b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextEntryFieldModel.swift index 7c2dfa9b..7d2eb987 100644 --- a/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextEntryFieldModel.swift +++ b/MVMCoreUI/Atomic/Atoms/FormFields/TextFields/TextEntryFieldModel.swift @@ -38,6 +38,14 @@ public var displayFormat: String? public var displayMask: String? + //-------------------------------------------------- + // MARK: - Initializers + //-------------------------------------------------- + + public override init(with text: String){ + super.init(with: text) + } + //-------------------------------------------------- // MARK: - Methods //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/LabelAttributeFontModel.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/LabelAttributeFontModel.swift index 72d57e40..6a2a1af5 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/LabelAttributeFontModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/LabelAttributeFontModel.swift @@ -18,6 +18,14 @@ var name: String? var size: CGFloat? + //-------------------------------------------------- + // MARK: - Initializer + //-------------------------------------------------- + + public override init(_ location: Int, _ length: Int) { + super.init(location, length) + } + //-------------------------------------------------- // MARK: - Keys //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/LabelAttributeImageModel.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/LabelAttributeImageModel.swift index 12e8d68d..7396e749 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/LabelAttributeImageModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/LabelAttributeImageModel.swift @@ -18,6 +18,14 @@ class LabelAttributeImageModel: LabelAttributeModel { var name: String? var URL: String? + //-------------------------------------------------- + // MARK: - Initializer + //-------------------------------------------------- + + public override init(_ location: Int, _ length: Int) { + super.init(location, length) + } + //-------------------------------------------------- // MARK: - Keys //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Molecules/HeadersAndFooters/MoleculeSectionHeaderModel.swift b/MVMCoreUI/Atomic/Molecules/HeadersAndFooters/MoleculeSectionHeaderModel.swift index 47db5cbf..12201722 100644 --- a/MVMCoreUI/Atomic/Molecules/HeadersAndFooters/MoleculeSectionHeaderModel.swift +++ b/MVMCoreUI/Atomic/Molecules/HeadersAndFooters/MoleculeSectionHeaderModel.swift @@ -14,6 +14,13 @@ public class override var identifier: String { "sectionHeader" } public var line: LineModel? + //-------------------------------------------------- + // MARK: - Initializer + //-------------------------------------------------- + public override init(with moleculeModel: MoleculeModelProtocol) { + super.init(with: moleculeModel) + } + //-------------------------------------------------- // MARK: - Keys //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Templates/ModalListPageTemplateModel.swift b/MVMCoreUI/Atomic/Templates/ModalListPageTemplateModel.swift index 9459aab6..f1208274 100644 --- a/MVMCoreUI/Atomic/Templates/ModalListPageTemplateModel.swift +++ b/MVMCoreUI/Atomic/Templates/ModalListPageTemplateModel.swift @@ -16,6 +16,14 @@ public var closeAction: ActionModelProtocol? + //-------------------------------------------------- + // MARK: - Initializer + //-------------------------------------------------- + + public override init(pageType: String, screenHeading: String?, molecules: [ListItemModelProtocol & MoleculeModelProtocol]) { + super.init(pageType: pageType, screenHeading: screenHeading, molecules: molecules) + } + //-------------------------------------------------- // MARK: - Keys //--------------------------------------------------