I have to create a table view (iPad app) that is able to show and collapse rows at different levels:
- Client 1
- Category 1
- Info 1
- Info 2
- Category 2
- Info 1
- Info 2
- Category 3
- Info 1
- Info 2
- Client 2
- Category 1
- Info 1
- Info 2
and so on...
If the user taps on a client row, the whole client related rows (Categories and infos under that client) should expand/collapse. In the other hand, if they tap on a particular Category only that category should expand/collapse.
So i'm planning to have nested NSMutableDictionaries to hold data which i can access by dynamic keys (like dynamic client names) but i'm not sure this approach will actually work to resolve the actual problem (make collapsible parts). Also, I'm not sure if using only rows and make them appear like header sections or use actual sections, because as far as i know i can not make sub-sections to achieve the three level nesting.
Any ideas? I've seen examples of projects with expandable rows but i'm still confused.
Help!