我正在开发一款基于iOS的PhoneGap应用,并在iPhone 4上进行测试,该设备运行的是IOS 6.1系统。我已经从“splash”文件夹中定义了所有启动画面,但仍然无法按预期工作。首先,闪屏正确加载并全屏显示,但当加载指示器出现时,图像会被缩小,并显示为白色背景包围。这看起来很丑陋。如何解决这个问题?谢谢所有人。
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";
}
}
使用
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
}
}
但是寻找更好的解决方案...
看起来 Cordova 只区分 iPhone 5 和 iPod。虽然我可以找到 iPad 方向和匹配启动画面的逻辑,但我找不到旧的 Retina iPhone + 甚至更早的原始屏幕分辨率的函数。这是意外遗漏了吗?