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 ~