了解iOS应用程序中使用的MVC模式 [英] Understanding MVC pattern used in iOS apps
问题描述
我已阅读Apple的MVC 文章和困惑的各种事情。首先,苹果在几乎所有的示例应用程序中使用View和Controller的组合,这是很好的,我喜欢它,但他们矛盾自己在这篇文章中,因为他们说View不应该依赖于控制器等。
I have read Apple's MVC article and am confused about various things. Firstly Apple uses a combination of the View and the Controller in almost all its sample applications which is fine and I like it but they contradict themselves in this article because they said that View's should not rely on Controllers etc.
我的主要问题是,任何人都有一个链接到苹果的示例iOS项目之一,这是一个MVC模式的一个很好的例子 - 数据检索等,因为我不完全理解模型部分模式。
My main question is does anyone have a link to one of Apple's sample iOS projects which is a good example of the MVC pattern - with data retrieval etc because I don't fully understand the Model part of the pattern.
我不明白域对象和模型对象之间的区别。例如,如果我想检索一个命令列表,这将发生在一个模型类Orders。
I don't understand the difference between a 'domain object' and a model object. For example if I wanted to retrieve a list of orders this would happen in a model class Orders. Would I then have another class Order which has properties such as OrderDate, OrderNumber etc or how would this work?
推荐答案
这篇关于了解iOS应用程序中使用的MVC模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!