What type of architecture do you use when creating apps in SwiftUI ?
We’ve done a major refactoring of our game and created from scratch the interface in SwiftUI framework, but what happens with our architecture?
We’ve choose MVVM with the help of Combine framework. MVVM is a powerful architecture because it provides a separation of concerns and a much more modularisation of your app.
For example for our Realm database we have a separate Manager that interacts with a Model class and the Model class than send a change state event for the UI to redraw.
SwiftUI responds very quickly if you hook up an ObservableObject with the View class itself.
In our Model class of course we take advantage of other types of observables such as PassthroughSubject class.
Let’s start learning together the great advantages of SwiftUI. Going further learning SwiftUI 2.0 available in beta version.
#WumbleWordsGame #SwiftUI #Learn #Game #CoolThings