MVC模型。

Model – model is responsible for holding the data or any operations on the data. The
model can be as simple as an array object that stores all the table data. Add, update and delete are examples of the operations. In business world, these operations are usually known as business rules.

View – view manages the visual display of information. For example, UITableView shows
information in a list format. Or the UIButton that appears on screen is another example.
Controller – controller is the bridge between model and view. It translates the user
interaction from the view (e.g. tap) into appropriate action to be performed in the model. For example, user taps a delete button in the view. Consequently, the controller triggers a delete operation in the model. Once finished, the model requests the view to refresh itself so as to reflect the update of the data model.

评论

此博客中的热门博文

使__attribute__((annotate("xxx")))能作用于OC函数

viewWillAppear不执行的解决办法

iOS中使用xpc/xpc.h