什么是UIViewController [英] What is a UIViewController

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

问题描述

我知道 UIView 是什么,但不是 UIViewController 。我只是想知道我能用它做什么,以及它与 UIView

I know what a UIView is but not a UIViewController. I just want to know what I could use it for, and what it is compared to a UIView

推荐答案

基本上你需要知道,什么是模型 - 视图 - 控制器架构在软件工程领域, UIView 对应于此架构的视图和 UIViewController 位于此体系结构的控制器端。

Basically you need to know, what is model-view-controller architecture in the software engineering field, the UIView corresponds to view of this architecture and UIViewController is at controller side of this architecture.

现在 UIViewController 可以被视为代理它控制(并具有方法的实现)屏幕上显示的 UIView 的事件和设计。您想要在视图上更改的任何内容都可以写入其控制器类中的方法,该方法从 UIViewController 类继承自身。这只是对这个大概念的简要描述。有关详细信息,请查看上述链接。

Now UIViewController can be thought as an agent that controls (and has the implementations of methods) the events and design of the UIView that is shown on the screen. Anything you want to change on the view can be written inside a method in its controller class, that inherits itself from UIViewController class. That is only the brief description of this big concept. For details you should look for the above link.

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

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