Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/105.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Xcode 6迁移到图像资产问题--黑色启动屏幕_Ios_Xcode_Xcasset - Fatal编程技术网

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

Ios Xcode 6迁移到图像资产问题--黑色启动屏幕,ios,xcode,xcasset,Ios,Xcode,Xcasset,我更新了我的应用程序,将图像资源用于应用程序图标,并启动我用这两个图标设置的图像 根据Apple文档选择合适的图像大小。我对Iphone的问题是 (4S/5/5S)发射图像/屏幕的模拟器始终为黑色,除了 iphone6+但在iPad上运行良好。我在这里看了几篇文章,什么都没有 工作如下 1) deleting the asset catalog and creating a new one 2) adding @2x and 3@x to each

我更新了我的应用程序,将图像资源用于应用程序图标,并启动我用这两个图标设置的图像 根据Apple文档选择合适的图像大小。我对Iphone的问题是 (4S/5/5S)发射图像/屏幕的模拟器始终为黑色,除了 iphone6+但在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
谢谢 迈克

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

也许这些是非常基本的步骤,但是:

  • 您是否尝试过进行完全清理并删除派生数据
  • 您是否已选中目标的“常规”选项卡,在“应用程序图标”和“启动图像”下
我发现,如果我转到应用程序目标常规选项卡并删除所有设备方向,启动图像将再次显示(即黑屏消失)。运行应用程序后,我返回到“应用程序目标常规”选项卡,恢复了所需的设备方向,启动映像将继续按需工作。

以下步骤适用于我:

  • 将图像添加到项目(根目录或资源文件夹),并指定以下名称(我将在纵向启动图像中描述它们):Degault.png(3.5英寸),默认值-567h@2x(4英寸),默认值-667h@2x(iphone6),默认值-736@2x(iphone6plus)
  • 转到常规选项卡上的目标设置、应用程序图标和启动图像->将启动图像源设置为不使用资产目录(“不使用资产目录”)
  • 从主图像资源中删除LaunchImage资源
  • 转到常规选项卡上的目标设置、应用图标和启动图像->将启动图像源设置为使用资产目录
  • XCode 6将询问您有关从现有映像迁移映像资产的问题。只需单击“迁移”
  • 它在iOS7和iOS8上对每种设备都有效。 注:
    如果您检查新的LaunchImage资产,您会发现它非常奇怪。它似乎只包含少数图像,没有iPhone 6或iPhone 6plus分辨率的图像

    应用程序开始运行后,您需要等待多长时间?启动可能需要15-20秒。也许这是我的一个愚蠢的建议,但它是有可能的。它几乎是瞬间没有延迟没有发生,它肯定会尝试一下。谢谢你的帮助,你能解决这个问题吗?同样的问题。启动图像显示在iPad和iPhone6+上,但在其他方面为黑色(iphone 5、iphone 5s、iphone 4s、iphone 6)。可能您的应用图标和启动图像仍在plist中引用?我发现这正是问题所在:取消选择横向方向,然后运行应用程序,然后再次选择方向确实起作用。
           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