天天看点

iPad开发简单介绍

iPad开发最大的不同在于iPhone的就是屏幕控件的适配,以及横竖屏的旋转。

Storyboard中得SizeClass的横竖屏配置,也不支持iPad开发。

在iOS7及以前得到屏幕旋转方向的方法

在iOS8以后,屏幕就只有屏幕之分,即当屏幕的宽大于高就是横屏,否则是竖屏。

iPad屏幕只有 (1024 * 768)横屏

(768 * 1024)竖屏

UIModalPresentationFullScreen :全屏显示(默认)

UIModalPresentationPageSheet

宽度:竖屏时的宽度(768)

高度:当前屏幕的高度(填充整个高度)

UIModalPresentationCurrentContext :跟随父控制器的呈现样式

UIModalTransitionStyleCoverVertical :从底部往上钻(默认)

UIModalTransitionStyleFlipHorizontal :三维翻转

UIModalTransitionStyleCrossDissolve :淡入淡出

UIModalTransitionStylePartialCurl :翻页(只显示部分,使用前提:呈现样式必须是UIModalPresentationFullScreen)

UIModalPresentationCustom

UIModalPresentationOverFullScreen

UIModalPresentationOverCurrentContext

UIModalPresentationPopover //iOS8之后过渡样式pop样式

UIModalPresentationNone

创建UIPopoverController控制器的内容控制器添加到UIPopoverController上

<code>强调</code>UIPopoverController不是继承UIViewController,也就不具备显示功能,要设置内容,使用initWithContentViewController设置内容

设置popView的大小(默认控制器有多大就显示多大)(120, 44 * 3)

UIPopoverController的方法popoverContentSize

内容控制器中设置的方法

self.preferredContentSize

self.contentSizeForViewInPopover /ios7过时/

调用方法

1&gt;调用方法

2&gt;控制器内,有自己的逻辑结构(和正常控制器一样可以跳转返回等)

方法

1&gt;masterViewController(主要控制器)

2&gt;负责展示主要的菜单内容

1&gt;detailViewController(详情控制器)

2&gt;负责展示详细内容

上一篇: 文件系统