https://github.com/coderyi/mvvmdemo
MVVM应用在iOS的Demo,主要通过经典的TableView来演示
https://github.com/coderyi/mvvmdemo
Last synced: over 1 year ago
JSON representation
MVVM应用在iOS的Demo,主要通过经典的TableView来演示
- Host: GitHub
- URL: https://github.com/coderyi/mvvmdemo
- Owner: coderyi
- License: other
- Created: 2015-06-28T13:01:56.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-24T03:23:54.000Z (over 9 years ago)
- Last Synced: 2025-04-02T04:58:59.026Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 50.8 KB
- Stars: 333
- Watchers: 17
- Forks: 86
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# MVVMDemo
MVVM在iOS应用的Demo,主要通过经典的TableView来演示
MVVM来自[微软](https://msdn.microsoft.com/en-us/library/hh848246.aspx),是一个相当不错的架构模式。
首先了解一下MVVM的架构

图片来自http://www.teehanlax.com/blog/model-view-viewmodel-for-ios/
### MVVMDemo的架构

**Model**: 数据的模型
**View**: 其实包括View和ViewController两部分,统称为View
**ViewModel**: 本Demo,主要是处理网络请求,把获取的数据显示在TableView上
另外
**TableViewProtocol**: 为了避免ViewController太重,我把TableView的DataSource和Delegate分离出来
### MVVMDemo的效果预览

参考链接:
[Model-View-ViewModel for iOS (译)](http://www.cnblogs.com/brycezhang/p/3840567.html)
copyright (c) 2015 coderyi.all rights reserved.