堆栈窗口打开时大小不正确

时间:2014-05-28 07:32:59

标签: ios livecode

我的应用程序有2个堆栈。堆栈1是"主要"并且它打开堆栈2.堆栈2是" slideview"并显示像电子书一样的图像。

我的应用程序适用于iOS。我在iPad上测试。我保存了一个独立的应用程序,可以在iOS上安装。

我使用程序" iExplorer"在ipad上打开我的应用程序目录并将堆栈2复制到"文档" 。目录

堆栈1中的脚本是:

on mouseUp
   put specialfolderpath("documents") into rootFolder
   put rootFolder& "/stack2.livecode" into filestack
   go stack filestack
end mouseUp

堆栈2中的脚本是:

on preOpenStack
   set the acceleratedRendering of this stack to true
   set the layerMode of image "Image" to "scrolling" 
end preOpenStack

这是我在触摸按钮打开堆栈2时看到的内容:

Incorrectly sized stack window Correctly sized stack window

我在iPad上拍摄了这张图片。

在堆栈2中,我使用语法

set the acceleratedRendering of this stack to true

如果我删除此语法并触摸按钮以打开堆栈2,则它的大小正确。发生了什么事?

1 个答案:

答案 0 :(得分:0)

添加了acceleratedRendering属性以帮助简化加速渲染功能的使用。设置为true时,LiveCode会自动将compositor属性配置为当前平台的最佳默认值。

当acceleRendering设置为true时,如果先前未设置compositorType,则引擎会按如下方式配置compositor属性:

  • iOS(非Retina iPhone):compositorType = OpenGL,compositorTileSize = 32,compositorCacheLimit = 16Mb
  • iOS(iPad / Retina iPhone):compositorType = OpenGL,compositorTileSize = 64,compositorCacheLimit = 32Mb
  • iOS(iPad Retina):compositorType = OpenGL,compositorTileSize = 64,compositorCacheLimit = 64Mb

也许compositorTileSize中存在错误。您可以尝试更改compositorTileSize:

set the compositorTileSize of this stack to 32

您需要尝试使用值(32)并查看哪个值是正确的:16,32,64,128或256.

另一种可能性是acceleRendering对全屏模式做了一些事情,即使它没有,全​​屏模式可能是解决这个问题的一种方法。

set the fullScreenMode of this stack to exactFit

我认为在这种情况下,exactFit会执行,但您也可以尝试showAllletterbox