Ios 如何使用Objective C制作iPad的初始屏幕尺寸?

Ios 如何使用Objective C制作iPad的初始屏幕尺寸?,ios,objective-c,iphone,ipad,splash-screen,Ios,Objective C,Iphone,Ipad,Splash Screen,我正试图通过编程方式为iPhone和iPad创建splash screen。在下面,我添加了我正在使用的代码,并将屏幕输出到显示半屏幕的iPad2模拟器中。我需要为所有iPad设备制作全屏幕尺寸 我的代码如下: // The device is an iPad and iPad mini running iOS 3.2 or later. CGSize result = [[UIScreen mainScreen] bounds].size; if(result

我正试图通过编程方式为
iPhone
iPad
创建
splash screen
。在下面,我添加了我正在使用的代码,并将屏幕输出到显示半屏幕的
iPad2
模拟器中。我需要为所有iPad设备制作全屏幕尺寸

我的代码如下:

 // The device is an iPad and iPad mini running iOS 3.2 or later.
        CGSize result = [[UIScreen mainScreen] bounds].size;
        if(result.height == 1024) {

            // iPad, iPad 2, iPad Mini
            splashImage.frame = CGRectMake(0, 0, 768,result.height);
            [splashImage setImage:[UIImage imageNamed: @"Default-Portrait.png" ]];
            activityIndicator.frame=CGRectMake(145, 240, 30, 30);
        }
        if(result.height == 2048) {

            // iPad Air, iPad Mini Retina
            splashImage.frame = CGRectMake(0, 0, 1536,result.height);
            [splashImage setImage:[UIImage imageNamed: @"Default-Portrait.png" ]];
            activityIndicator.frame=CGRectMake(145, 240, 30, 30);
        }

IPAD SPLASH

 iPadImage-Appname-Portrait.png * 768w x 1004h (with status bar)
 iPadImage-Appname-Portrait@2x.png * 1536w x 2008h (with status bar)
 iPadImage-Appname-Landscape.png ** 1024w x 748h (with status bar)
 iPadImage-Appname-Landscape@2x.png ** 2048w x 1496h (with status bar)

 iPadImage-Appname-Portrait.png * 768w x 1024h (without status bar)
 iPadImage-Appname-Portrait@2x.png * 1536w x 2048h (without status bar)
 iPadImage-Appname-Landscape.png ** 1024w x 768h (without status bar)
 iPadImage-Appname-Landscape@2x.png ** 2048w x 1536h (without status bar)

我用的是同样的尺寸,但不是working@ReshmiMajumder你在info.plist中设置了它吗?除非它是一个通用应用程序,否则它应该是这样运行的。如果它是iPhone专用的应用程序,它将像这样运行(就像iPad中的iPhone4S和4)。