Open johnallen24 opened 6 years ago
Hi,
Sorry for the very late reply. It won't work out of the box, since DropDownMenu.menuCells
is a flat array.
To work around this, you can probably do something along these lines:
DropDownMenu
menuCellsBySection
that gets updated every time menuCells
is updatedUITableViewDataSource/Delegate
methods to use menuCellsBySection
numberOfSections(in:)
tableView(_:, numberOfRowsInSection:)
tableView(_:, heightForRowAt:)
tableView(_:, cellForRowAt:)
tableView(_:, didSelectRowAt:)
selectMenuCell(_:)
to take in account the sectionIt's probably not exactly easy to do, but if you take a look at the source code, it should be doable.
In the long run, DropDownMenuKit could support sections out of the box or I might tweak the API to simplify the workaround above.
Hi
Just wondering if it is possible to create sections with section headers like in a UITableView?
Thanks