IOS Initial use of MVVM

Source: Internet
Author: User

1,MVVM Personal Understanding

MVVM has a viewmodel more than MVC, and his appearance is to give Viewcontroller a thin body. MVC has separated the view and the data model, and the only further decoupling, we do not put the network request in view or Viewcontroller, but a separate proposed viewmodel. Understand relatively shallow, first write a blog to leave a trace, continue to study.

2, File structure

3,demo Analysis

There is a mvcdemo and a Mvvmdemo in the demo, and the application scenario is to display the data of the network request on a tableview. There is no write up and down refresh, just get acquainted with MVVM first. This is just a simple mvvm, just take the Web request out alone and put it in the Tableviewmodel.

4,demo

Https://github.com/TianHero/MVVM

IOS Initial use of MVVM

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.