SwiftUI + Combine, using Models and ViewModels together
问题 I'm very new to Swift and I am currently trying to learn by building a rent splitting app with SwiftUI + Combine. I want to follow the MVVM pattern and am trying to implement this. At the moment I have the following Model, ViewModel and View files: Model: import Foundation import Combine struct InputAmounts { var myMonthlyIncome : Double var housemateMonthlyIncome : Double var totalRent : Double } ViewModel (where I have attempted to use the data from the Model to conform to the MVVM pattern,