Reputation: 8489
I am in a situation where i need nth level UITableView
.
My problem is i have a list of accounts, when user tap on account I need to show list of its sub accounts, in sub accounts list if user tap on a sub account I need to show list of its sub accounts and so on.
Upvotes: 0
Views: 286
Reputation: 2411
What you need can be easily achieved using the free Sensible TableView framework. The framework will automatically display your list of accounts, and will generate all the needed detail views once an account cell is tapped.
Upvotes: 1
Reputation: 1742
What you should do is create a subclass of UITableViewController that will recreate instances of itself when the user selects a row. put the first instance in a navigationcontroller and use
[navigationController pushViewController: animated]
to display the children. added benefit: you will get a navigationbar to go in reverse direction for free. thats not recursive strictly speaking, but its close and it will do the job. Just make sure you have a conditional statment in there somewhere, so it wont go on forever.
Upvotes: 1