MVC design mode for iOS

Source: Internet
Author: User

MVC design mode for iOS

MVC is a standard that all object-oriented programming languages should comply with. The MVC idea is to divide an application into three basic parts: Model and View) and Controller. They work collaboratively with minimal coupling to improve application scalability and maintainability.
Model component: During ios application development, the Model component is usually a common Objective-C class, which can be used to save a small amount of application state data. When the application has a large amount of Data, you can consider using Core Data to build a Data model.
(For example, the name, gender, age, student ID, and other data in our student information management system are all specific manifestations of the Model component)
View components: when developing ios applications, you mainly use Interface Builder to create view components. However, most of the actual projects use code to create components, which makes it easy to modify the interface and more likely to expand the existing view components. (The most typical example is the. xib file)
Controller component: the Controller component is usually acted by the Objective-C class. When the Controller component can be a fully custom class (inheriting the NSObject subclass ). However, in most cases, the Controller component inherits the UIViewController base class in the UIKit framework. by inheriting and modifying the base class, a large number of functions can be obtained.
(I admit that I borrowed money from others. Do I have to ask for money? Here you are. Haha ^_^)

OK! Some new users may still be confused in the cloud. Normally, it is hard to understand it when you start learning. When you study later, you will understand this mode again. O (fuel _ fuel) O Haha ~

Related Article

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.