v3quick
v3quick copied to clipboard
3.3RC1横向的UIListVie导致程序崩溃问题
可以通过如下方法重现: 修改v3quick/quick/samples/ui/src/app/scenes/TestUIListViewScene.lua,把label的text设置长些 function TestUIListViewScene:sourceDelegate(listView, tag, idx) -- print(string.format("TestUIListViewScene tag:%s, idx:%s", tostring(tag), tostring(idx))) if cc.ui.UIListView.COUNT_TAG == tag then return 50 elseif cc.ui.UIListView.CELL_TAG == tag then local item local content
item = self.lv:dequeueItem()
if not item then
item = self.lv:newItem()
content = cc.ui.UILabel.new(
{text = "item item item item"..idx,
size = 20,
align = cc.ui.TEXT_ALIGN_CENTER,
color = display.COLOR_WHITE})
item:addContent(content)
else
content = item:getContent()
end
content:setString("item item item item:" .. idx)
item:setItemSize(120, 80)
return item
else
end
end
fixed, pull #362