I’m new in mono touch iOS/monotouch development. I want to make multi-level table in my app, but don’t know how.. i’ve tried to search web, but found nothing (except ancient 2009 year’s sample which does not work).
Let we have table:
- row1
- row2
- row3
User taps on row2 and it expands:
- row1
- row2
- [subrow1]
- [subrow2]
- row3
If user tap row2 again, it collapses.
I know, realization should be quite easy, but I have no experience in it right now.
It will be great to get some assistance!
Thanks in advance.
There is no built-in / default control in iOS that behaves like a TreeView (e.g. in System.Windows.Forms). This is largely because this requires a bit more screen space than an iPhone/iPod has.
The common solution is to use tables, e.g. add a “>” in your cell (which can be expanded) and show a new controller the data (either a table or something else).
Another options is to find (and bind) some custom controls that offers a treeview-like controls (there are some listed in the previous link) or, like @Jason said, implement something similar out of an
UITableViewand related-types.