繁体   English   中英

Xcode 6迁移到图像资产问题 - 黑色启动屏幕

[英]Xcode 6 Migrating to Images assets issues — Black launch screen

我更新了我的应用程序以使用Image Asset for App Icon和Launch Images我根据Apple Doc设置了适当的图像大小。 我对Iphone和(4S / 5 / 5S)模拟器的启动图像/屏幕的问题总是黑的,除了Iphone 6+,但它在iPad上工作正常。 我在这里查看了几个帖子,没有任何工作如下

         1) deleting the asset catalog and creating a new one      
         2) adding @2x and 3@x to each file before adding to the catalog
         3) removing and redeploying the application 

      Anyone had that issue when porting image catalog ? Im using Xcode 6  
      Targeting ios 7 and 8

谢谢迈克

       Update 1
          When disabling landscape launch screen appears normally
          something i noticed before doing, so on either the device and the simulator
          the application starts in landscape even if the device is held in portrait 
          and then it rotate to portrait. Still trying to solve that issue now

以下步骤适用于我:

  1. 使用以下提名将图像添加到项目(根目录或资源文件夹)中(我将其描述为Portrait launchimages):Degault.png(3.5英寸),默认值为567h @ 2x(4英寸),默认值为667h @ 2x(iPhone 6),默认值736 @ 2x(iPhone 6plus)。
  2. 转到常规选项卡上的目标设置,应用程序图标和启动图像 - >将启动图像源设置为不使用资产目录('不使用资产目录')。
  3. 从主图像资源中删除LaunchImage资产
  4. 转到常规选项卡上的目标设置,应用程序图标和启动图像 - >设置启动图像源以使用资产目录
  5. XCode 6将向您询问有关现有图像的图像资产迁移的信息。 只需点击“迁移”即可。

它适用于iOS7,iOS8上的各种设备。 注意:如果你检查新的LaunchImage资产,你会发现它真的很奇怪。 它似乎只包含一些没有iPhone6或iPhone 6plus分辨率图像的图像。

我发现,如果我转到应用目标常规标签并删除所有设备方向,则会再次显示启动图像(即黑屏消失)。 运行应用程序后,我返回到应用程序目标常规选项卡并恢复所需的设备方向,并且启动图像继续按照需要工作。

(我的答案应该在评论部分,但由于我的声誉,我不能在那里发布)

可能这些是非常基本的步骤但是:

  • 您是否尝试过彻底清理并删除派生数据?
  • 您是否在应用程序图标和启动图像下选中了目标的常规选项卡?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM