【问题标题】:Xcode storyboard splash screen for iOS is not scaling properly适用于 iOS 的 Xcode 故事板闪屏未正确缩放
【发布时间】:2021-01-25 10:55:16
【问题描述】:

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

将我的应用程序部署到真机或模拟器时,启动画面未正确缩放 - 其失真。我尝试了各种编辑和更改,但没有解决问题。它看起来像是在使用我的初始屏幕的横向版本并将其平滑以适合纵向视图。

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

  1. 设备方向:纵向
  2. LaunchScreen:CDVLaunchScreen(这是一个故事板)
  3. 界面生成器文档: 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" />

我的想法很新鲜。

【问题讨论】:

    标签: ios xcode cordova splash-screen xcode-storyboard


    【解决方案1】:

    用户错误...总是正确的。当我制作飞溅图像时是凌晨 2 点,第二天我不知道出了什么问题。我拍摄了一张 2732x2732 的图像,然后简单地将其调整为每种通用尺寸……这使每张图像都出现了偏差。我刚刚更正了我的所有图像,使我的图像在每个通用 X/Y 尺寸内居中。

    无脑移动。精疲力竭会对你造成影响。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-12
      • 1970-01-01
      • 1970-01-01
      • 2023-03-29
      • 1970-01-01
      相关资源
      最近更新 更多