手机
当前位置:查字典教程网 >编程开发 >IOS开发 >Modal View Controller的不同呈现方式
Modal View Controller的不同呈现方式
摘要:ModalViewController可以有不同的呈现方式(modalPresentationStyle),在ipad下要提供多方向支持时,...

ModalViewController可以有不同的呈现方式(modalPresentationStyle),在ipad下要提供多方向支持时,就要注意可能要改变ModalViewController的呈现方式,列举如下:

UIModalPresentationFullScreen:全屏模式,即弹出窗口占满整个屏幕,在portrait模式和landscape模式下都一样,

UIModalPresentationFormSheet:会将窗口缩小,使之居于屏幕中间,在portrait和landscape下都一样,但要注意landscape下如果软键盘出现,窗口位置会调整。

UIModalPresentationPageSheet:比较给力的一种模式,在portrait时是FullScreen,在 landscape时和FormSheet模式有点像(上下没有留出空间),注意有这种需求的朋友直接用这种模式就可以了,不要想着自己编程去在 FullScreen和FormSheet去切换,很麻烦

UIModalPresentationCurrentContext:(有空再补充)

例子:

ControllerA.modalPresentationStyle = UIModalPresentationPageSheet;

[self presentModalViewController:ControllerA animated:YES];

【Modal View Controller的不同呈现方式】相关文章:

iOS简单登录LoginViewController、注册RegisterViewController等功能实现方法

iOS 开发中 NavigationController经常出现的问题原因分析

开发IOS关于子UIViewController和父UIViewController相互调用方法

iOS中nil 、NULL、 Nil 、NSNull的区别

iOS开发中UIPopoverController的使用详解

iphone的safari浏览器中实现全屏浏览的方法

IOS开发:提示框的正确实现方式

IOS中UIWebView加载Loading的实现方法

IOS 九宫格布局实现方法

IOS代码笔记UIView的placeholder的效果

精品推荐
分类导航