Defined the View and the ViewModel protocols.
This commit is contained in:
parent
b76b36d6f1
commit
daf8bd7ff6
17
Apps/Locations/Libraries/Sources/Core/Protocols/View.swift
Normal file
17
Apps/Locations/Libraries/Sources/Core/Protocols/View.swift
Normal file
@ -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 }
|
||||||
|
|
||||||
|
}
|
@ -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 }
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user