问题描述
什么是控制器类,如uiviewcontroller? uiviewcontroller和uiview之间有什么区别?
感谢!
Cocoa使用面向对象编程中的Model-Controller-View概念工作
在此系统中,模型由存储和处理应用程序正在使用的任何数据的对象组成,视图由实际控制应用程序显示方式的类组成。 p>
控制器是作为中介的对象。该视图通过控制器提供的方法获得其数据,该方法直接处理模型。
这里有一个很好的解释:
What are controller classes, like uiviewcontroller? What's the difference between uiviewcontroller and uiview?Thanks!
Cocoa works using the Model-Controller-View concept in Object-Oriented Programming
In this system the model consists of objects that store and work with any data being used by the application, the view consists of the classes that actually control the how the application is displayed.
The controllers are objects that act as a go-between. The view gains its data through methods provided by the controller, which deals with the model directly.
There is a good explanation of this concept here:Cocoa Application Tutorial: Essence of Cocoa
这篇关于什么是控制器类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!