【问题标题】:Optimize tableView insertion in CoronaSDK优化 Corona SDK 中的表格视图插入
【发布时间】:2013-07-02 02:01:01
【问题描述】:

处理此代码需要两秒钟。

print("before loop scholarships:"..system.getTimer())
for i = 1, scholarshipTableSize  do

-- Insert the row into the tableView
tableView:insertRow
{
    isCategory = false,
    rowHeight = 75,
    rowColor =      
    { 
        default = { 255, 232, 4 },
        over = { 0, 158, 255 },
    },
    lineColor = { 0, 0, 0 },
}
end

scholarshipTableSize 大约为 1200。如何优化此插入以使其执行得更快?

【问题讨论】:

    标签: lua coronasdk


    【解决方案1】:

    在我更新到最新的电晕版本后,时间好多了。大约 2 毫秒。

    现在我使用的是 build 2013.1137

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-06
      • 1970-01-01
      • 2013-12-13
      相关资源
      最近更新 更多