簡體   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