这段代码需要两秒钟的时间来处理。
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。我如何优化此插入以使其执行得更快?
最佳答案
在我更新到最新的 corona 版本后,时间好多了。大约 2 毫秒。
现在我使用的是 build 2013.1137
关于lua - 优化 Corona SDK 中的 TableView 插入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17463932/