From d10b356786baa549c13cfa401c5eab441267f865 Mon Sep 17 00:00:00 2001 From: Robin Lemaire Date: Tue, 24 Oct 2023 11:05:50 +0200 Subject: [PATCH] [Fix-559] Demo: Open the alignment of the integration StackView --- .../Classes/View/Components/Main/ComponentUIView.swift | 6 +++++- .../View/Components/Main/ComponentUIViewModel.swift | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/spark/Demo/Classes/View/Components/Main/ComponentUIView.swift b/spark/Demo/Classes/View/Components/Main/ComponentUIView.swift index 511afa435..7dd3df954 100644 --- a/spark/Demo/Classes/View/Components/Main/ComponentUIView.swift +++ b/spark/Demo/Classes/View/Components/Main/ComponentUIView.swift @@ -58,7 +58,7 @@ class ComponentUIView: UIView { ] ) stackView.axis = .vertical - stackView.alignment = .fill + stackView.alignment = self.integrationStackViewAlignment stackView.spacing = 12 return stackView }() @@ -132,13 +132,17 @@ class ComponentUIView: UIView { } } + private let integrationStackViewAlignment: UIStackView.Alignment + private var subscriptions: Set = [] // MARK: - Initialization init(viewModel: ComponentUIViewModel, + integrationStackViewAlignment: UIStackView.Alignment = .leading, componentView: UIView) { self.viewModel = viewModel + self.integrationStackViewAlignment = integrationStackViewAlignment self.componentView = componentView diff --git a/spark/Demo/Classes/View/Components/Main/ComponentUIViewModel.swift b/spark/Demo/Classes/View/Components/Main/ComponentUIViewModel.swift index 7e9345b5b..76d33b0ea 100644 --- a/spark/Demo/Classes/View/Components/Main/ComponentUIViewModel.swift +++ b/spark/Demo/Classes/View/Components/Main/ComponentUIViewModel.swift @@ -9,14 +9,6 @@ import Combine import Foundation -// protocol ComponentUIViewModel { -// -// // MARK: - Properties -// -// var identifier: String { get } -// var configurationViewModel: ComponentsConfigurationUIViewModel { get } -// } - class ComponentUIViewModel { // MARK: - Properties