{"id":17977948,"url":"https://github.com/coderyi/mvvmdemo","last_synced_at":"2025-04-09T11:12:12.267Z","repository":{"id":90803698,"uuid":"38199040","full_name":"coderyi/MVVMDemo","owner":"coderyi","description":"MVVM应用在iOS的Demo，主要通过经典的TableView来演示","archived":false,"fork":false,"pushed_at":"2017-03-24T03:23:54.000Z","size":52,"stargazers_count":333,"open_issues_count":6,"forks_count":86,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-02T04:58:59.026Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-28T13:01:56.000Z","updated_at":"2025-03-23T09:04:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"1fada1eb-fa5b-45fb-804c-fd19eec3b631","html_url":"https://github.com/coderyi/MVVMDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderyi%2FMVVMDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderyi%2FMVVMDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderyi%2FMVVMDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderyi%2FMVVMDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderyi","download_url":"https://codeload.github.com/coderyi/MVVMDemo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027411,"owners_count":21035594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T17:30:14.640Z","updated_at":"2025-04-09T11:12:12.245Z","avatar_url":"https://github.com/coderyi.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MVVMDemo\nMVVM在iOS应用的Demo，主要通过经典的TableView来演示\n\nMVVM来自[微软](https://msdn.microsoft.com/en-us/library/hh848246.aspx)，是一个相当不错的架构模式。\n\n首先了解一下MVVM的架构\n\n![MVVM](http://teehanlax.com.s3.amazonaws.com/wordpress/wp-content/uploads/mvvm1.png)\n\n图片来自http://www.teehanlax.com/blog/model-view-viewmodel-for-ios/\n\n### MVVMDemo的架构\n\n![](http://7u2k5i.com1.z0.glb.clouddn.com/github_mvvmdemo1.png?imageMogr2/thumbnail/!50p)\n\n**Model**:  数据的模型\n\n**View**:  其实包括View和ViewController两部分，统称为View\n\n**ViewModel**:  本Demo，主要是处理网络请求，把获取的数据显示在TableView上\n\n另外\n\n**TableViewProtocol**:  为了避免ViewController太重，我把TableView的DataSource和Delegate分离出来\n\n### MVVMDemo的效果预览\n\n![](http://7u2k5i.com1.z0.glb.clouddn.com/github_mvvmdemo_appfile.png?imageMogr2/thumbnail/!40p)\n\n参考链接：\n\n[Model-View-ViewModel for iOS (译)](http://www.cnblogs.com/brycezhang/p/3840567.html)\n\ncopyright (c) 2015 coderyi.all rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderyi%2Fmvvmdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderyi%2Fmvvmdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderyi%2Fmvvmdemo/lists"}