css - Cordova 闪屏

标签 css ios iphone cordova splash-screen

我在 phonegapp 应用程序中设置了所有内容。在我拖放 CordovaLib.xcodeproj 之后,更改我的应用程序图标和屏幕文件夹中的启动画面。但应用程序仍在加载 cordovaLib 启动画面。所以,我从 CordovaLib 元素中删除了屏幕,它正在运行。我的初始屏幕名称为 Default.png、Default@2x.png 等。但在 config.xml 文件中有其他名称。但是我的应用程序可以在适当的屏幕上工作。我需要更改 config.xml 文件吗?

enter image description here

<gap:splash gap:platform="ios" height="480" src="res/screen/ios/Default.png" width="320" />
<gap:splash gap:platform="ios" height="960" src="res/screen/ios/Default_at_2x.png" width="640" />
<gap:splash gap:platform="ios" height="1136" src="res/screen/ios/Default-568h_at_2x.png" width="640" />
<gap:splash gap:platform="ios" height="1024" src="res/screen/ios/Default-Portrait~ipad.png" width="768" />
<gap:splash gap:platform="ios" height="768" src="res/screen/ios/Default-Landscape~ipad.png" width="1024" />
<gap:splash gap:platform="ios" height="2048" src="res/screen/ios/Default-Portrait_at_2x~ipad.png" width="1536" />
<gap:splash gap:platform="ios" height="1536" src="res/screen/ios/Default-Landscape_at_2x~ipad.png" width="2048" />

最佳答案

是的,您的 config.xml 应该始终指向启动画面的正确位置。

虽然 Xcode 在选择初始屏幕时会忽略 config.xml,但 Cordova CLI 不会。尝试使用 CLI 构建和运行将失败。

此外,诸如 PhoneGap Build 之类的服务将无法构建您的应用程序,甚至某些插件也会由于格式错误的 config.xml 而导致随机错误,其中路径指向不存在的文件。

关于css - Cordova 闪屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20064865/

相关文章:

html - 在 4 列中让一个段落围绕另一个段落流动

css - 验证 -moz-box-sizing

css - 我如何将 p-growl 元素放置在屏幕的右下角?

ios - 获取已删除实体的关系。 (碰撞)

ios - 如何检测电子邮件地址更改是否已还原?

iphone - 将声音与 CCAnimation 同步

html - 从div中切出的透明半圆

ios - 有没有办法验证电子邮件地址是否是有效的 Paypal 电子邮件

iphone - UITableView 代表的父类(super class)?

iphone - 在 UITabBarController 和 UIViewController 之间切换(iOS Xcode)