diff --git a/JSONCreator_iOS/JSONCreator/AppDelegate.swift b/JSONCreator_iOS/JSONCreator/AppDelegate.swift index 042ac17..084c6cc 100644 --- a/JSONCreator_iOS/JSONCreator/AppDelegate.swift +++ b/JSONCreator_iOS/JSONCreator/AppDelegate.swift @@ -8,7 +8,6 @@ import UIKit import MVMCoreUI -import VDS @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate { diff --git a/JSONCreator_iOS/JSONCreator/DecodableDefaults+VDS.swift b/JSONCreator_iOS/JSONCreator/DecodableDefaults+VDS.swift index bb23af3..30e002d 100644 --- a/JSONCreator_iOS/JSONCreator/DecodableDefaults+VDS.swift +++ b/JSONCreator_iOS/JSONCreator/DecodableDefaults+VDS.swift @@ -68,7 +68,7 @@ extension VDSFontWeight { } } -extension VDSToggle { +extension Toggle { public enum DefaultOffText: DecodableDefault.Source { public static var defaultValue: String { "Off" } } diff --git a/JSONCreator_iOS/JSONCreator/TestToggle.swift b/JSONCreator_iOS/JSONCreator/TestToggle.swift index c9055ca..46ca9fb 100644 --- a/JSONCreator_iOS/JSONCreator/TestToggle.swift +++ b/JSONCreator_iOS/JSONCreator/TestToggle.swift @@ -23,14 +23,14 @@ extension MoleculeViewProtocol { } } -extension Modelable where Self: MoleculeViewProtocol { +extension ModelHandlerable where Self: MoleculeViewProtocol { public init(model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { self.init(with: model as! ModelType) self.set(with: model, delegateObject, additionalData) } } -open class TestToggle: VDSToggleBase, MoleculeViewProtocol, MVMCoreViewProtocol { +open class TestToggle: ToggleBase, MoleculeViewProtocol, MVMCoreViewProtocol { /// The state on the toggle. Default value: false. open override var isOn: Bool { @@ -59,6 +59,15 @@ open class TestToggle: VDSToggleBase, MoleculeViewProtocol, MVM onModelChange(model: viewModel) } + override open func setup() { + super.setup() + self.setupView() + } + + // MARK:- MVMCoreViewProtocol + public func updateView(_ size: CGFloat) {} + public func setupView() {} + // MARK:- MoleculeViewProtocol public func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { diff --git a/JSONCreator_iOS/JSONCreator/TestToggleModel.swift b/JSONCreator_iOS/JSONCreator/TestToggleModel.swift index bf01592..dc0beeb 100644 --- a/JSONCreator_iOS/JSONCreator/TestToggleModel.swift +++ b/JSONCreator_iOS/JSONCreator/TestToggleModel.swift @@ -12,7 +12,7 @@ import MVMCoreUI import VDS //MARK: - Model -public class TestToggleModel: MoleculeModelProtocol, FormFieldProtocol, VDSToggleModel { +public class TestToggleModel: MoleculeModelProtocol, FormFieldProtocol, VDS.ToggleModel { //--------------------------------------------------