尽管有Lauch屏幕文件,为什么需要启动图像?

时间:2017-09-21 03:03:27

标签: ios ios11 xcode9 launchimage

在iOS 10中,我使用Launch Screen File代替Launch Images

enter image description here

在iOS 11的Xcode 9中转换为Swift 4后,我收到以下警告:

  

缺少“Default-568h@2x.png”启动图像

enter image description here

为什么在启动屏幕时需要启动图像?

2 个答案:

答案 0 :(得分:7)

解决方案是临时添加启动图像资产目录。

  1. 点击Use Asset Catalog...
  2. enter image description here

    1. 选择创建新的资产目录:
    2. enter image description here

      1. 切换回Don't use asset catalogs
      2. enter image description here

        1. 删除自动创建的Images.xcassets

        2. 警告消失了。

答案 1 :(得分:0)

在Xcode 9.4中,如果我们点击iOS 8.0 and laterLaunchImage会显示一个名为iPhone X Portrait iOS 11+的广告位

enter image description here

您需要参考静态启动屏幕图像指南https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/launch-screen/。这是iPhone X的尺寸

iPhone X    portrai 1125px × 2436px landscape 2436px × 1125px

enter image description here

相关问题