При создании мобильного приложения я использую следующий файл config.lua.Corona SDK: настройка iPhone 5
Экран не будет настраиваться на iPhone5 при создании устройства. Тем не менее, он будет регулироваться при работе на симуляторе, который обеспечивает корона.
Можете ли вы сказать мне, находится ли проблема в этом файле или зависит от какой-либо другой проблемы с реализацией.
Спасибо!
/S
local isTall = ("iPhone" == system.getInfo("model")) and (display.pixelHeight > 960)
-- iPad Configuration
if (string.sub(system.getInfo("model"), 1, 4) == "iPad") then
application =
{
content =
{
width = 360,
height = 480,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}
-- iPhone5 Configuration
elseif (string.sub(system.getInfo("model"), 1, 2) == "iP" and display.pixelHeight > 960) then
application =
{
content =
{
width = 320,
height = 568,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}
-- iPhone 3,4 and Older iPod Touch
elseif (string.sub(system.getInfo("model"), 1, 2) == "iP") then
application =
{
content =
{
width = 320,
height = 480,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}
-- Android, Kindle Fire, and Nook
elseif (display.pixelHeight/display.pixelWidth > 1.72) then
application =
{
content =
{
width = 320,
height = 570,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}
else
application =
{
content =
{
width = 320,
height = 512,
scale = "letterBox",
xAlign = "center",
yAlign = "center",
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
}
end