CollectionView布局监听问题
Open
- Dominant language
- Objective-C
- Stars
- 3.7k
- Forks
- 759
- PR merge metrics
- No merged PRs in 30d
Description
请问,我现在使用CollectionView来进行布局,创建形如ListView的列表;但是我想根据列表中宽度最大的item的宽度来作为CollectionView的宽度,我该怎么做,设置了onLayout方法貌似没执行?
local tableView = CollectionView(tableViewData)
tableView:onLayout(function()
tableView:onLayout.adjustSize()--此处没调用
end)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the CollectionView and onLayout usage shown in the issue, then reproduce the ListView-like layout with tableViewData. Trace whether the onLayout callback runs and how the largest item width is expected to affect the CollectionView; done means the callback behavior and required width adjustment are documented or verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, objective-c
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100