Introduction to iOS App Design Patterns
-
How to implement the model in MVP
- Static method (difficult to do DI)
- https://medium.com/@rockname/clean-archirecture-7be37f34c943 method
- Personally, I feel like this MVP implementation is the correct answer.
-
As an approach,
- Presenter: (If Swift can be used in Android) Can this code be directly used?
- Model: Can this code be easily converted to CLI?
-
I try to have an image like this (Is it correct?)
-
When passing data during view transition
- Create an interface of the destination view in the source presenter
- In the
prepare(for segue:)
method of the source view, call the source presenter with the destination view as an argument - When called, send the data there
-
Is this the correct answer? (Probably)