What is the difference between UIView and UIViewController?

陌路散爱 提交于 2019-11-29 08:03:31
Erik

The UIViewController is the controller part in the MVC design pattern.

Model<------->Controller<------->View

The controller's task is to handle navigation between different views, key presses, and screen touches etc.

Bongeh

A view is merely an object, kind of like a piece of paper, that other objects are put onto.

A View Controller is an object that controls views, pushing and popping them forwards and backwards in a navigation stack.

"View Controllers Programming Guide for iOS"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!