Learn note from the start of the zero (Day67)--cocoa Touch design mode and application MVC mode

Source: Internet
Author: User

original articles, welcome reprint. Reprint Please specify: Dongsheng's blog

MVC ( Model-view-controller , the Model - View - Controller) mode is one of the very old design patterns that first appeared in Smalltalk language. Today, many computer languages and architectures use the MVC pattern.  

MVC Mode Overview

mvc A pattern is a composite design pattern, which is composed of observer strategy composite ") mode. mvc mode by 3 3

    • model

    • view controller  

       

650) this.width=650; "Width=" "height=" 266 "title=" image2.jpg "style=" WIDTH:500PX;HEIGHT:266PX; "src="/HTTP/ S2.51cto.com/wyfs02/m01/7d/12/wkiol1bfvekq_fydaaispfc_hdu446.jpg "border=" 0 "vspace=" 0 "hspace=" 0 "alt=" Wkiol1bfvekq_fydaaispfc_hdu446.jpg "/>

corresponding to the "content" and "form" in philosophy, in the MVC in the model, the pattern is "content", which stores the data required by the view, the view is "form", is the external representation, and the controller is their medium.

Cocoatouch in the MVC Mode

we're talking about generic. MVC mode, and Cocoa and the Cocoa Touch in the framework MVC Patterns and traditional MVC mode is slightly different, the former model and view can not make any communication, all communication is done through the controller,.

650) this.width=650; "Width=" "height=" 275 "title=" Untitled -2.jpg "style=" width:500px;height:275px; "src="/HTTP/ S1.51cto.com/wyfs02/m02/7d/13/wkiom1bfu-gzuaw4aanf_c-cqoa649.jpg "border=" 0 "vspace=" 0 "hspace=" 0 "alt=" Wkiom1bfu-gzuaw4aanf_c-cqoa649.jpg "/>

in theCocoa Touchframework ofUIKitFramework,Uiviewcontrolleris the root class for all controllers, such asUitableviewcontroller,Uitabbarcontrollerand theUinavigationcontroller. UIViewis the root class for views and controls.

Welcome to follow Dongsheng Sina Weibo@tony_Dongsheng.
Learn about the latest technical articles, books, tutorials and information on the public platform of the smart Jie classroom
650) this.width=650; "Width=" "height=" "title=" Qrcode_for_gh_ca9759a5ef7f_258.jpg "style=" width:150px; height:150px; "src=" http://s5.51cto.com/wyfs02/M01/7D/12/wKioL1bfvJ6yX9hYAADC6S3kNXs580.jpg "border=" 0 "vspace=" 0 "hspace=" 0 "alt=" wkiol1bfvj6yx9hyaadc6s3knxs580.jpg "/>More ProductsIOS,Cocos, mobile Design course please pay attention to the official website of Chi Jie Classroom:http://www.zhijieketang.com
Smart-Jie Classroom Forum Website:http://51work6.com/forum.php


This article is from the "Dongsheng-ios Technical Consultant" blog, make sure to keep this source http://tonyguan.blog.51cto.com/701759/1749101

Learn note from the start of the zero (Day67)--cocoa Touch design mode and application MVC mode

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.