在iPad App的横向模式下获取启动图像

时间:2015-09-30 06:46:42

标签: ios

在iPad上启动应用程序时,我无法获得横向启动图像。 App仅支持iPad。我尝试使用1024x768图像,但仍然无法正常工作。即使我尝试将UIInterfaceOrientation键添加到info.plist

2 个答案:

答案 0 :(得分:0)

所有文件名都区分大小写。

将它们重命名为:Default-Landscape.png& Default-Landscape@2x.png

资本“D”

在模拟器中它不区分大小写,但在设备中它是

仅限iPad的应用程序:

以PNG格式为每个支持的方向创建启动图像。每个启动图像必须为1024 x 748像素(对于横向)或768 x 1004像素(对于肖像)。

默认启动图像文件:

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.For iPad launch images, do not include the status bar region. 

创建这些尺寸的启动图像:

For portrait:

768 x 1004 pixels

1536 x 2008 pixels (high resolution)

对于风景:

1024 x 748 pixels

2048 x 1496 pixels (high resolution)

答案 1 :(得分:0)

请遵循APPDelegate方法中的代码。

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        if(IS_IPAD)
        {
         NSNumber *value = [NSNumber numberWithInt:UIDeviceOrientationPortrait];
        [[UIDevice currentDevice] setValue:value forKey:@"orientation"];
        }
    }

这可能会有所帮助。

相关问题