看了许多博客文章,发现有两张很好的架构图(没有之一)清晰的介绍了什么是MVC和MVP,这里借用一下:
MVC

MVP

我的理解是MVC和MVP的区别主要:
谁来承担“管家”的职能:分配任务,
谁承担“接任务”的职能:展示并接收“响应”事件,
谁承担“做任务”的职能:按照业务逻辑需求处理
MVC:
Model:NSObject
View:UIView
Controller: UIViewController
MVP:
Model :NSObject
View:UIViewController
Controller:NSObject
网友评论