Search code examples
iphoneioscocoa-touchxcode4

How to create multi level views in NSTableView style?


I have got a project which has multiple levels. I do not find a proper way to start. The project mock ups are in hierarchical structure (tree like structure). It has almost 10 levels. So how to implement these levels in multiple table views where one action can open specific table view? Should I have to create different views for all levels? Or I can simply write data structure of my views in plist file (xml) and use that file for all levels. Please suggest me how to start. Thanks


Solution

  • If user interaction is required at each level & there is considerable information to be displayed to the user, then you should be going with nested UITableViews, where tapping on the row of one leads to the next one. You can have a look at the settings app for an example.

    Yes, you will have to create a view for each level. However, 10 levels seems like a bit too much from the user experience point of view (Can you think of an existing app that has 10 levels?). You should give a thought to flattening your tree by combining a few levels together.