3
votes

I am developing a phonegap app on iOS and testing on an iPhone 4 with IOS 6.1. I have defined all splash screens from the splash folder but still this doesn't work as expected. First the splashscreen is loaded correct, full size, but when the loading indicator appears, the image is shrunk and it's shown surrounded with white background. It looks ugly. How can this be fixed?

Thanks all.

2
Are you providing splash screen image sizes for both iPhone 4 and 5? When you say shrunk, in exactly which way (height, width, both, etc)? You shouldn't need a dirty workaround for this at all.OhmzTech
Yes, I provide images for iphone 4 size, iphone 5 size and also ipad with and without retina display. The splash screen is shrunk in both height and width. Practically if's only shown in the middle of the screen with big white borders around it.danpop

2 Answers

1
votes

Found a "dirty" solution:

In CDVViewController.m replace

    if (launchImageFile == nil) { // fallback if no launch image was specified
    if (CDV_IsIPhone5()) {
        // iPhone 5 or iPod Touch 6th-gen
        launchImageFile = @"Default-568h";
    } else {
        launchImageFile = @"Default";
    }
}

With

if (launchImageFile == nil) { // fallback if no launch image was specified
    if (CDV_IsIPhone5()) {
        // iPhone 5 or iPod Touch 6th-gen
        launchImageFile = @"Default-568h";
    } else {
        launchImageFile = @"Default-568h"; //iphone5 image
    }
}

But searching for a better solution to this ...

0
votes

Seems like Cordova only makes difference between iPhone 5 and iPod. while i can find the logic for iPad orientations and matching splash screens, I could not find the functions for old Retina iPhone + even older original screen resolution. Omitted by accident?