diff --git a/Apps/Locations/Libraries/Sources/Core/Protocols/View.swift b/Apps/Locations/Libraries/Sources/Core/Protocols/View.swift new file mode 100644 index 0000000..43c0b70 --- /dev/null +++ b/Apps/Locations/Libraries/Sources/Core/Protocols/View.swift @@ -0,0 +1,17 @@ +// +// View.swift +// Core +// +// Created by Javier Cicchelli on 11/04/2023. +// Copyright © 2023 Röck+Cöde. All rights reserved. +// + +/// This protocol defines the view of the **MVVM** architecture. +public protocol View { + + // MARK: Properties + + /// The view model related to the view. + var viewModel: ViewModel { get set } + +} diff --git a/Apps/Locations/Libraries/Sources/Core/Protocols/ViewModel.swift b/Apps/Locations/Libraries/Sources/Core/Protocols/ViewModel.swift new file mode 100644 index 0000000..a550329 --- /dev/null +++ b/Apps/Locations/Libraries/Sources/Core/Protocols/ViewModel.swift @@ -0,0 +1,17 @@ +// +// ViewModel.swift +// Core +// +// Created by Javier Cicchelli on 11/04/2023. +// Copyright © 2023 Röck+Cöde. All rights reserved. +// + +/// This protocol defines the view model of the **MVVM** architecture. +public protocol ViewModel: AnyObject { + + // MARK: Properties + + /// The reference to the coordinator that initialised the view model. + var coordinator: Coordinator { get set } + +}