适用于iOS的Xcode故事板初始屏幕无法正确缩放

问题描述

我的应用程序是Cordova应用程序...我所做的大部分工作都是从CLI编译的,然后在Xcode中验证一些内容,然后将其部署到设备中进行测试。

将我的应用程序部署到真实手机或模拟器时,初始屏幕无法正确缩放-变形。我尝试了各种编辑和更改,但没有任何方法可以纠正此问题。看起来像是使用我的启动屏幕的横向版本并将其倾斜以适合纵向视图。

在Xcode中,我验证了以下内容

  1. 设备方向:纵向
  2. LaunchScreen:CDVLaunchScreen(这是一个情节提要)
  3. Interface Builder文档: x =使用特征变化 x =使用安全区域布局指南 x =用作启动屏幕
  4. 查看->内容模式=缩放比例

对于我的config.xml文件

        <splash src="resources/ios/splash/Default@2x~universal~anyany.png" /> (2732 x 2732)
        <splash src="resources/ios/splash/Default@2x~universal~comany.png" /> (1278 x 2732)
        <splash src="resources/ios/splash/Default@2x~universal~comcom.png" /> (1334 x 750)
        <splash src="resources/ios/splash/Default@3x~universal~anyany.png" /> (2208 x 2208)
        <splash src="resources/ios/splash/Default@3x~universal~anycom.png" /> (2208 x 1242)
        <splash src="resources/ios/splash/Default@3x~universal~comany.png" /> (1242 x 2208)
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="2688" src="resources/ios/splash/Default-2688h~iphone.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-2688h~iphone.png" width="2688" />
        <splash height="1792" src="resources/ios/splash/Default-1792h~iphone.png" width="828" />
        <splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" />
        <splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
        <splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />

我没什么主意。

解决方法

用户错误...总是正确的。当我制作启动画面时是凌晨2点,第二天我不知道出了什么问题。我拍摄了2732x2732的图像,然后将其调整为每个通用尺寸...从而使每个图像偏斜。我刚刚校正了所有图像,以使图像在每种通用X / Y尺寸内居中。

骨头移动。精疲力尽会做到这一点。