qmathe / DropDownMenuKit

UIKit drop down menu, simple yet flexible and written in Swift
Other
303 stars 38 forks source link

Creating Sections #24

Open johnallen24 opened 6 years ago

johnallen24 commented 6 years ago

Hi

Just wondering if it is possible to create sections with section headers like in a UITableView?

Thanks

qmathe commented 5 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:

It'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.