用ModalViewController切换View
来源:互联网 发布:android 高仿微信源码 编辑:程序博客网 时间:2024/05/16 14:06
当程序中含有多个 view,需要在之间切换的时候,可以使用 UINavigationController,或者是 ModalViewController。
UINabigationController 是通过向导条来切换多个 view。
如果 view 的数量比较少,且显示范围为全屏的时候,用 ModalViewController 更合适(比如需要用户输入信息的view,结束后自动返回 到之前的view)。
ModalViewController 并不像 UINavigationController 是一个专门的类,使用 UIViewController 的 presentModalViewController 方法指定之后就是 ModalViewController 了。
设计时要保证:
1、发起和取消ModalView的是同一个object (一般是ModalViewController的父类)。
2、一般采用自设delegate的办法实现在同一个object中控制。
3、自设delegate即ModalViewController类定义一个protocol让父类实现,并将父类设为delegate对象。
然后ModalViewController调用delegate的方法(即协议方法)时,由父类完成。
- 用ModalViewController切换View
- 利用ModalViewController切换View
- 利用ModalViewController切换View
- iOS: 利用ModalViewController切换View
- iPhone开发进阶--- 利用ModalViewController切换View
- iPhone开发之利用ModalViewController切换View
- iPhone开发进阶--利用ModalViewController切换View
- iPhone开发之利用ModalViewController切换View
- iPhone开发之利用ModalViewController切换View
- iPhone开发进阶(7)— 利用ModalViewController切换View
- iPhone开发进阶(7)--- 利用ModalViewController切换View
- iPhone开发进阶————利用ModalViewController切换View
- iPhone开发之ModalViewController视图切换
- 如何解散modalViewController的modalViewController
- iPhone View切换动画
- iphone 实现View切换
- SegmentControl点击切换View
- iOS: 切换view
- 关于CCV1.3源码的调试
- spring源码学习笔记-初始化(三) registerBeanPostProcessors
- VM ESXI 外网访问端口号443
- JavaScript js 左右移动下拉列表选项
- 结构体的相互嵌套
- 用ModalViewController切换View
- OpenGL API分类
- 昨天做了一个自定义标签
- C++ primer第二次阅读学习笔记(第18章:特殊工具与技术:运行时类型识别、extern。。。)
- sd_fusing.sh注释
- java-Graphic2D-绘制跳棋,国际象棋,象棋
- 走进FileNet CE-了解ECM(企业内容管理)
- SQL大总结——转载经典——价值过亿
- Mongodb的update操作