- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在创建我的移动应用程序时使用了以下 config.lua 文件。
构 build 备时,屏幕不会适应 iPhone5。但是,它会在 corona 提供的模拟器上运行时进行调整。
你能告诉我问题是出在这个文件中,还是取决于其他一些实现问题。
谢谢!
/小号
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
最佳答案
解决了!
显然,我认为这一点一点都不清楚,需要添加(到应用程序的根目录)一个名为“Default-568h@2x.png”的文件,它告诉设备进入 iPhone5 模式!
此文件应为尺寸为 640x1136 的 png
可以在以下位置找到更多信息:
在“支持高大的应用程序”下
关于scripting - 电晕SDK : iPhone 5 adjustment,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16167846/
我正在尝试使用 Storyboard 切换场景,但是当我按下按钮时,它会保持当前场景......我无法在互联网上的任何地方找到解决此问题的方法。终端提示正在进入打印出“离开主菜单”的方法,我的下一个场
我正在尝试仅在一个场景中播放背景声音。销毁该场景后,声音应消失并停止。然后,当重新创建场景时,声音应重新开始播放。 这是我正在尝试的: local backgroundMusic local back
我正在尝试使用本地通知系统实现一个应用程序。系统应该取消一些不必要的通知。 System.scheduleNotification 工作正常(它创建通知并且它们工作正常)但它返回 nil (它应该返回
我有以下代码: local storyboard = require "storyboard" local options = { effect = "slideLeft", time
我正在尝试测试是否可以以某种方式将我制作的一些应用程序放到我的手机上,但在 Corona 中,我只能为 Android、Kindle 和 Nook 构建,而不能为 iPhone 构建。有谁知道为什么没
在调用 onComplete 之前,我需要检查“regalo”是否为 nil,因为有时会被 Collision 事件删除,当我调用 onComplete=removeRegalo 时它会返回错误 ni
我想为对象设置线速度,而不必将其添加为物理体。我怎么做?有可能吗? 谢谢! 最佳答案 我认为你不能这样做,但你可以做的是将可选属性 isSensor 设置为 true 以避免视觉冲突。 例如: phy
我正在尝试取消在另一个“触摸事件”函数内的“触摸事件”函数中启动的计时器,如下所示: local function startNewGame(event) if(event.phase=="ended
我有一个 Corona SDK 制作的游戏,您必须在其中扔一个球,但球很难在设备上扔,因为它太小了。如何增加球周围可敏感触摸的区域? 我尝试创建另一个大圆圈,其顶部有一个小 alpha,并使球坐标与每
我是一名优秀的程序员,十分优秀!