什么是控制器类? [英] What are controller classes?

查看:385
本文介绍了什么是控制器类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是控制器类,如uiviewcontroller? uiviewcontroller和uiview之间有什么区别?
感谢!

解决方案

Cocoa使用面向对象编程中的Model-Controller-View概念工作



在此系统中,模型由存储和处理应用程序正在使用的任何数据的对象组成,视图由实际控制应用程序显示方式的类组成。 p>

控制器是作为中介的对象。该视图通过控制器提供的方法获得其数据,该方法直接处理模型。



这里有一个很好的解释:
Cocoa应用程序教程:Cocoa的本质


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

这篇关于什么是控制器类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆