From 0aeaeeb81ce25927b2ff494aaba2beb2176f7bdc Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 1 Aug 2022 17:36:46 -0500 Subject: [PATCH] Signed-off-by: Matt Bruce --- VDS/Components/Toggle/VDSToggle.swift | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/VDS/Components/Toggle/VDSToggle.swift b/VDS/Components/Toggle/VDSToggle.swift index 28f2ce29..79f4c371 100644 --- a/VDS/Components/Toggle/VDSToggle.swift +++ b/VDS/Components/Toggle/VDSToggle.swift @@ -28,7 +28,7 @@ import Combine } required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") + super.init(with: DefaultToggleModel()) } } @@ -173,6 +173,21 @@ import Combine } } } + + //-------------------------------------------------- + // MARK: - Initializers + //-------------------------------------------------- + public convenience init() { + self.init(with: ModelType()) + } + + required public init(with model: ModelType) { + super.init(with: model) + } + + required public init?(coder: NSCoder) { + super.init(with: ModelType()) + } //-------------------------------------------------- // MARK: - Constraints