3

我更新了我的应用程序以将图像资源用于应用程序图标和启动图像,我根据 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
4

3 回答 3

3

以下步骤对我有用:

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

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

于 2014-11-03T23:31:38.140 回答
1

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

于 2014-09-29T17:14:25.853 回答
0

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

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

  • 您是否尝试过完全清理并删除派生数据?
  • 您是否在应用程序图标和启动图像下检查了目标的常规选项卡?
于 2014-09-24T23:57:46.413 回答