iphone, ipad, ios的启动图片。

iphone, ipad, ios的启动图片。,第1张

概述Technical Q&A QA1588 Technical Q&A QA1588 Automatic orientation support for iPhone and iPad apps Q:  What is needed to support multiple orientations in my iPhone and iPad apps? A: There are three thin

Technical Q&A QA1588


Technical Q&A QA1588 automatic orIEntation support for iPhone and iPad apps Q:  What is needed to support multiple orIEntations in my iPhone and iPad apps?

A: There are three things you must implement to automatically support orIEntations in your iPhone and iPad apps: provIDe launch images,update your Info.pList settings,and implement the -shouldautorotatetoInterfaceOrIEntation: method.

important It is strongly recommended that your application support all orIEntations. This includes portrait,portrait upsIDe-down,landscape left and landscape right. iPad apps that require an orIEntation must support both variants of that orIEntation.

ProvIDe Launch Images

important All file names are case sensitive.

iPhone-only applications:

iPhone-only applications may only have one launch image. It should be in PNG format and measure 320 x 480 pixels. name your launch image file Default.png.

For iPhone 4 high resolution,you can include an additional launch image. It should be in PNG formate and measure 640 x 960 pixels. name it Default@2x.png. This image will get picked up by the iOS if your app is running on an iPhone 4.

Note: If your app is not running on an iPhone 4,and you provIDed both Default.png and Default@2x.png,iOS will automatically pick up Default.png as the launch image.

iPad-only applications:

Create a launch image for each supported orIEntation in the PNG format. Each launch image must be 1024 x 748 pixels (for landscape) or 768 x 1004 pixels (for portrait).

Default launch image files:

Default-PortraitUpsIDeDown.png - upsIDe-down portrait version.

Default-Landscapeleft.png - left-orIEnted landscape version.

Default-LandscapeRight.png - right-orIEnted landscape version.

Default-Portrait.png - generic portrait version.

Default-Landscape.png - generic landscape version.

Default.png - default portrait launch. Its usage is strongly discouraged,use more specific launch images instead.

Note: For iPad-only applications,it is common application to provIDe only Default-Portrait.png and Default-Landscape.png. More specific launch images will take precedence over the generic versions,for example Default-PortraitUpsIDeDown.png takes precedence over the Default-Portrait.png image file for this specific orIEntation. See the "Providing Launch Images for Different Orientations" section on the iOS Application Programming Guide for more information.

Universal applications:

Include launch images for both iPhone and iPad. iPhone launch image will still be named Default@2x.png. name your iPad portrait launch image Default-Portrait.png (do not useDefault.png as the iPad portrait launch image).

Back to Top Update Your Info.plist Settings

In your Info.plist file:

Specify values for the UISupportedInterfaceOrientations key for the supported orientations.

Specify values for the UIInterfaceOrientation key for the initial launch orientation.

Note: If you need to configure your iPad application differently from your iPhone application,you can specify device-specific values for Info.pList keys in iPhone OS 3.2 and later. See the "Creating a Universal Application" section in the iOS Application Programming Guide.

Back to Top Implement -shouldAutorotateToInterfaceOrientation: Method

In your UIViewController class,implement the -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method to return the supportedUIInterfaceOrientation constants. This method should return YES to support all orientations.

See Q&A: Supporting orientations for iPad apps for supporting orIEntations in iPad apps.

See Q&A: Why won't my UIViewController rotate with the device? for possible reasons your vIEw controller does not rotate.

Back to Top

document Revision History
Date Notes
2011-03-17

Corrected the dimensions for iPad launch images.

2010-08-06 Included more information on launch images for iPhone-only and universal apps.

2010-06-01 Corrected the dimension for iPad portrait launch image. Changed the context to apply only for automatic orIEntation support.

2010-05-17 New document that describes the required steps to automatically support orIEntations for iPhone and iPad apps.

总结

以上是内存溢出为你收集整理的iphone, ipad, ios的启动图片。全部内容,希望文章能够帮你解决iphone, ipad, ios的启动图片。所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1091573.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存