I’m looking to create a menu with collapsible submenus in my iOS app. It should look something like this:
Main menu item 1
Submenu item 1
Submenu item 2
Submenu item 3
Main menu item 2
Submenu item 1
Submenu item 2
I don’t want the drill-down approach Apple does with UINavigationController since the submenus are few (1-3) and have very short titles. I also want to be able to collapse or expand submenus when a corresponding main menu item is tapped.
I don’t see how I can coax UITableView to do this so I’m thinking I have to do my own control unless someone has a better idea.
This is a sample code from Apple, have a look and create one which you need
here