我需要以下方面的详细解释:
我们使用 UIViewController
做什么?
有什么用?
我有一个如下所示的类:
class one
{
UINavigationController *nav = ...;
two *secondObject = ...;
// By use of it, I have push the new view class two//ok
}
class two
{
...
}
如何在 one
类中使用 secondObject
?
从窗口开始的类层次是什么?
最佳答案
UIViewController
是 MVC
中的 Controller 部分 设计模式。
Model
<------->
<强> Controller
<------->
<强> View
Controller 的任务是处理不同 View 之间的导航、按键和屏幕触摸等。
关于ios - UIView 和 UIViewController 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4669783/