/ Swift


This style of app design where view controllers serve as the communication pipeline between your views and data model is known as MVC (Model-View-Controller). In this pattern, models keep track of your app’s data, views display your user interface and make up the content of an app, and controllers manage your views. By responding to user actions and populating views with content from the data model, controllers serve as a gateway for communication between the model and views. MVC is central to a good design for any iOS app, and so far, the FoodTracker app has been built along MVC principles.

将View Controller作为view和model之间信息通讯的管道的APP设计风格称为MVC (Model-View-Controller). 在这种模式下,model负责记录APP的数据,view负责显示用户界面并且是一款APP的主要内容,而controller则对view进行管理。通过对用户操作做出响应、并且用data model的内容来对view进行填充,controller在model和view之间扮演者沟通桥梁的角色。MVC是优秀的iOS APP设计的核心,一直以来,FoodTracker (官方教程中的示例APP) 的构造一直遵循着MVC原则。

Yin Guobing

Yin Guobing

BOE技术研发工程师🔬,业余码农😳,蓝猫铲屎官🐈。曾独立开发了一款iOS APP并上线🎉。现居北京,正在为了理想中的生活而奋斗..

Read More