PhoneGap iPad lauch screen does not fit

I created an application compatible with iPhone and iPad. Since it is based on HTML (PhoneGap), the application itself is the same for both devices (HTML scales are good!). But the launch image on the screen does not fill on the iPad at startup.

My Resorces folder has only an iPhone launcher image that should be small for the iPad, how can I add another for the iPad?

+3
source share
6 answers

You need to specify the property of the startup image file ( UILaunchImageFile) in your info.plist application:

, UILaunchImageFile~ipad iPad, iPad-Portrait.png iPad-Landscape.png. iPhone (Default.png) iPhone.

.

+9

, , phonegap 1.9, , :

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    UIImage* image = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Default-Portrait" ofType:@"png"]];
    imageView = [[UIImageView alloc] initWithImage:image];
    [image release];

    imageView.tag = 1;
    [window addSubview:imageView];
    [imageView release];
}

"applicationDidFinishLaunching" [super applicationDidFinishLaunching: application].

+1

, , , . Build/Run PhoneGap "" xcode. , . , , ipad iphone.

+1

. , . . , < iOS 3.2, Info.plist ., .

, Apple Info.plist/splash screen. :

http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BuildTimeConfiguration/BuildTimeConfiguration.html#//apple_ref/doc/uid/TP40007072-CH7-SW18

: " " Info.plist. :

Default.png → () iPad

Default-Landscape.png → ( ) iPad

Default-Portrait.png → ( ) iPad

Default~iphone.png → () iPhone

:

Default@2x~iphone.png → - > () iPhone

+1

"Default.png" - . , , , , IPAD, C, . , IPAD ( , default.png iphone, ... , , !)

0

UILaunchImageFile .plist http://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html.

This works, but you must remember to drag and drop your ipad image into Xcode. This will not work, just adding the file to the file browser, you should use Xcode!

0
source

Source: https://habr.com/ru/post/1744565/


All Articles