【问题标题】:Distorted splash screen in Cordova (IOS)Cordova (IOS) 中扭曲的初始屏幕
【发布时间】:2016-01-27 18:41:00
【问题描述】:

我的问题是启动画面在我的纯横向 Cordova 应用程序中失真(第一张图片)。几秒钟后,飞溅显示正确(第二张图片)。

我已经在 res/screen/ios 中创建了所有启动画面,并完全按照https://cordova.apache.org/docs/en/latest/config_ref/images.html 中的描述配置了 config.xml。

我尝试了 Cordova 闪屏插件 (https://github.com/apache/cordova-plugin-splashscreen),但后来我只得到一个黑屏(文档给您留下了很多想象空间(“SplashScreen (string). 用于显示闪屏的资源名称。不同的平台为此使用值。”??)。所以我可能没有设法正确配置它。

我的 config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget id="se.mycompany.test" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Test</name>
    <description>
        Test
    </description>
    <author email="my@email.com" href="http://www.mywebsite.se">
        MyCompany
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <plugin name="cordova-plugin-splashscreen" spec="1" />
    <preference name="SplashScreen" value="Default~iphone.png" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="SplashScreenDelay" value="1" />
    <preference name="SplashMaintainAspectRatio" value="false" />
    <preference name="SplashShowOnlyFirstTime" value="true" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="Orientation" value="landscape" />
    <preference name="fullscreen" value="true" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
        <splash src="res/screen/ios/Default@2x~iphone.png" width="640" height="960"/>
        <splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/>
        <splash src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
        <splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/>
        <splash src="res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
        <splash src="res/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136"/>
        <splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/>
        <splash src="res/screen/ios/Default-736h.png" width="1242" height="2208"/>
        <splash src="res/screen/ios/Default-Landscape-736h.png" width="2208" height="1242"/> 
    </platform>
</widget>

【问题讨论】:

  • 尝试删除此行&lt;preference name="SplashScreen" value="Default~iphone.png" /&gt;

标签: ios cordova splash-screen


【解决方案1】:

这似乎是 Cordova 3 的问题。更新后问题自行解决。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多