LoginSignup
1
1

More than 5 years have passed since last update.

[自分用][随時更新]iOSのアーキテクチャ所感

Posted at

自分へのメモ書きとして投稿

MVP

Model View Presenter
Presenterがデータを保持する。
ViewControllerはPresenterの値を取得・利用する。
PresenterがViewControllerの参照を保持する。
それにより、データ更新が終わったときに保持したViewControllerの更新メソッドを呼ぶことで変更を反映できる。

MVVM

Model View ViewModel
ViewModelがデータを保持する。
ViewControllerへのデータ変更の反映は、バインドしたViewModelから行う。
変数へ値をセットした時にdidSetが呼ばれ、バインドされているViewControllerのメソッドが呼ばれることで、
データ更新を反映できる。

参考サイト

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1