iOS开发——Modal View Controller的不同呈现类型
来源:互联网 发布:ios破解软件下载 编辑:程序博客网 时间:2024/05/16 06:32
ModalViewController可以有不同的呈现类型(modalPresentationStyle),在ipad下要提供多方向支持时,就要注意可能要改变ModalViewController的呈现方式,列举如下:
1. UIModalPresentationFullScreen:全屏模式,即弹出窗口占满整个屏幕,在portrait模式和landscape模式下都一样。
2. UIModalPresentationFormSheet:会将窗口缩小,使之居于屏幕中间,在portrait和landscape下都一样,但要注意landscape下如果软键盘出现,窗口位置会调整。
3. UIModalPresentationPageSheet:比较给力的一种模式,在portrait时是FullScreen,在landscape时和FormSheet模式一样,注意有这种需求的朋友直接用这种模式就可以了,不要想着自己编程去在FullScreen和FormSheet去切换,很麻烦
4. UIModalPresentationCurrentContext:(有空再补充)
例子:弹出UITableViewController:
实现:在类ConfigViewController中弹出类ConfigMenuController :UITableViewController
如下:
在类ConfigViewController对应的方法中实现
ConfigMenuController *cmc = [[[ConfigMenuController alloc] initWithNibName:nil bundle:nil] autorelease];
cmc.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController: cmc animated: YES];
- iOS开发——Modal View Controller的不同呈现类型
- iOS4.0开发——Modal a Controller的不同呈现类型modalPresentationStyle
- iOS4.0开发——Modal a Controller的不同呈现类型modalPresentationStyle
- Modal View Controller的不同呈现方式
- iOS 动画教程-自定义 View Controller 呈现转换
- iOS—Model,Controller,View
- iOS 跳转出现attempt to dismiss modal view controller whose view does not currently ……的解决方案
- IOS 开发 View Controller 综述
- 《iOS Human Interface Guidelines》——Modal View
- 《iOS Human Interface Guidelines》——Modal View
- iOS学习笔记02—View Controller的生命周期
- iOS学习笔记02—View Controller的生命周期
- 【iOS开发】获取当前view(视图)所在的Controller(控制器)
- presenting view controller and presenting modal view controller
- attempt to dismiss modal view controller
- IOS开发中的window,controller,view
- iOS开发UI篇—Modal简单介绍
- iOS开发UI篇—Modal简单介绍
- hibernate支持的方言
- ArcSDE和Geodatabase10.1抢先版谍照介绍(4)——Geodatebase高级对象
- 缓慢变化维介绍
- v4l2打开video设备 .
- wpf 在win7边缘最大化
- iOS开发——Modal View Controller的不同呈现类型
- x86 x64 开发区别与注意事项
- Linux下修改/增加默认load(link)路径
- [jQuery]使用jQuery.Validate 使用笔记
- Thread与ThreadPool的内存之战
- c++ vector用法精讲
- objective C property属性详解
- C#语法糖(Csharp Syntactic sugar)大汇总
- myeclipse中编辑到request.的时候,myeclipse就会自动退出的解决