2013-05-16 36 views
2

我正在測試和實施的SDK Corona在xCode模擬器中測試的是屏幕頂部和底部的兩個區域,這些區域在模擬器iPhone5的錶冠中缺失。我正在使用許多網站推薦的「config.lua」(代碼如下),但我無法解決問題。 請,我需要緊急幫助解決它,並且我的應用程序將適合整個屏幕。謝謝!視網膜4英寸iPhone 5不需要頂部/底部部分

http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

enter image description here

回答

2

你可以使用給定的代碼ow -

if system.getInfo("model") == "iPad" or system.getInfo("model") == "iPad Simulator" then 

    application = { 
      content = { 
        width = 360, 
        height = 480, 
        scale = "zoomEven", 
        audioPlayFrequency="44100", 
        fps = 30, 

        imageSuffix = { 
         ["@2x"] = 2, 
         ["@4x"] = 4, 
        } 
      } 
    }   
    -- For "tall" sizes (iPhone 5 and new iTouch) 

    elseif display.pixelHeight > 960 then 

    application = { 
      content = { 
        width = 320, 
        height = 568, 
        scale = "zoomEven", 
        audioPlayFrequency="44100", 
        fps = 30, 

        imageSuffix = { 
         ["@2x"] = 2, 
        } 
      } 
    } 

    else -- For traditional sizes (iPhone 4S & below, old iTouch) 

    application = { 
      content = { 
        width = 320, 
        height = 480, 
        scale = "zoomEven", 
        audioPlayFrequency="44100", 
        fps = 30, 

        imageSuffix = { 
         ["@2x"] = 2, 
        } 
      } 
    } 
end 

此代碼將用於config.lua。

祝你好運!

0

此文件是必需的。名稱必須完全匹配。如果擴展名是.PNG,它將不起作用。

相關問題