From b2b33db8a986517997760a7007fef6ce24a83179 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 20 Sep 2023 14:40:56 -0500 Subject: [PATCH] Revert "Revert "subclass line directly"" This reverts commit 10370f3ac6840a89f97b158aecfe4b6691765519. --- MVMCoreUI/Atomic/Atoms/Views/Line.swift | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/Line.swift b/MVMCoreUI/Atomic/Atoms/Views/Line.swift index c527a362..e3195aa2 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Line.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Line.swift @@ -9,22 +9,15 @@ import UIKit import VDS -@objcMembers open class Line: VDS.View, VDSMoleculeViewProtocol { +@objcMembers open class Line: VDS.Line, VDSMoleculeViewProtocol { //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- - open var line = VDS.Line() open var viewModel: LineModel! open var delegateObject: MVMCoreUIDelegateObject? open var additionalData: [AnyHashable : Any]? - open var orientation: VDS.Line.Orientation = .horizontal { - didSet { - viewModel.orientation = orientation - update(viewModel: viewModel) - } - } - + //-------------------------------------------------- // MARK: - Initializer //-------------------------------------------------- @@ -47,15 +40,6 @@ import VDS super.init(coder: coder) viewModel = LineModel(type: .primary) } - - //-------------------------------------------------- - // MARK: - Overrides - //-------------------------------------------------- - open override func setup() { - super.setup() - addSubview(line) - line.pinToSuperView() - } //-------------------------------------------------- // MARK: - Methods @@ -89,8 +73,8 @@ import VDS //-------------------------------------------------- open func viewModelDidUpdate() { surface = viewModel.surface - line.style = VDS.Line.Style(rawValue: viewModel.type.rawValue) ?? .primary - line.orientation = viewModel.orientation + style = VDS.Line.Style(rawValue: viewModel.type.rawValue) ?? .primary + orientation = viewModel.orientation } //--------------------------------------------------