请问,我现在使用CollectionView来进行布局,创建形如ListView的列表;但是我想根据列表中宽度最大的item的宽度来作为CollectionView的宽度,我该怎么做,设置了onLayout方法貌似没执行? local tableView = CollectionView(tableViewData) tableView:onLayout(function() tableView:onLayout.adjustSize()--此处没调用 end)
请问,我现在使用CollectionView来进行布局,创建形如ListView的列表;但是我想根据列表中宽度最大的item的宽度来作为CollectionView的宽度,我该怎么做,设置了onLayout方法貌似没执行?
local tableView = CollectionView(tableViewData)
tableView:onLayout(function()
tableView:onLayout.adjustSize()--此处没调用
end)