ios 5 开发 1 之 mvc
来源:互联网 发布:硕思logo软件注册码 编辑:程序博客网 时间:2024/05/22 07:51
MVC (model , view , controller)
对于有过gui开发经验或者熟悉design patter 的程序员来说,MVC模式的魅力有目共睹。
记得真正开始了解mvc,正是用gtk开发程序的阶段。而mvc正是ios 5ui开发的核心指导模式。
ios 大概包含4个layers:
Cocoa touch : Multi touch , core motion , webview , map kit , camera
Media :Core audio , Audio miing , video playback ...
Core Services:Collections , Address Book , Networking , SQLite...
Core OS : OSX Kernel , Power management,File System , Sockets , Bonjous ...
所谓view(display part),正是直接呈现再用户面前的东西,比如gtk中的treeview,tableview, 对应的cocoa中也有,而且更
丰富,比如webview .
而model(what your application is) ,为view解释(interprete)和组织了(format)数据。
controller (UI logic)正是model 和view通信的纽带,因为他们不能直接通信 .
contoller 和view的通信 主要靠outlet和action(类似gtk中的signal)来实现
--The controller can drop a target on itself , then hand out an action to the view ,the views send the action when things happen in the UI
View通过委托(delegate)来与controller同步信息,可通过设置datasource property从Controller获得数据
所以我们说 controller作为view的 delegate和datasource而存在。
model不能与view和controller直接通信,它的数据更新是通过radio station( Notification & KVO)的方式传递的。
controller可以有选择的接受.
- ios 5 开发 1 之 mvc
- ios开发之MVC
- iOS开发之MVC
- iOS开发之MVC模型
- iOS 之 MVC 开发模式
- IOS之MVC开发模式
- iOS 之 MVC 开发模式
- IOS开发基础之MVC模式
- ios开发之MVC模式理解
- 菜鸟iOS 开发之MVC MVVM ReactiveCocoa
- iOS开发之理解iOS中的MVC设计模式
- iOS开发之理解iOS中的MVC设计模式
- iOS开发之理解iOS中的MVC设计模式
- iOS开发之理解iOS中的MVC设计模式
- iOS开发之理解iOS中的MVC设计模式
- iOS开发之理解iOS中的MVC设计模式
- iOS开发之理解iOS中的MVC设计模式
- iOS开发之理解iOS中的MVC设计模式
- WINDOWS消息编程
- 网吧机器爱蓝屏?给大家提供一个硬件检测精品套装!
- 接口中的域
- 网友发现Q版西游:唐僧师徒脸谱上50元人民币
- CPSR
- ios 5 开发 1 之 mvc
- 如何做好产品经理-产品经理定位
- C++中extern “C”含义深层探索
- Windows内系统文件结构
- 好不容易登陆上来了,呵呵
- 给aptana studio3增加jQuery的提示支持
- android .9.png保证图片拉伸后内容不变形
- NYOJ 27 水池数目【搜索】
- ie缓冲