coderyi/MVVMDemo

View Controller ( TableViewDataSource) is still interacting with Model(Custom Model)

Closed this issue · 3 comments

I think this might not be a proper example for MVVM. In MVVM, view and controller should be interacting with view model only.

The 'view model' here is more like 'store' in MVCS

谢谢你的意见,你是说我的TableViewModel更像是一个Store类,一个数据提供类吗?我的View(CustomTableViewCell) 以及Controller(TableViewController) 与外界交互确实有点乱,请问我该怎么改会更符合MVVM

@coderyi I forked your repository and made some modifications.

https://github.com/grittymindy/MVVMDemo