Reputation: 15147
Can We create tree structure in UITableView like below.
-Sub1 //First row
-Sub1sub1 //First row's child
-sub1sub1sub1 //Child's child etc..
-sub1sub1sub2
-Sun1sub2
-sub2sub2sub1
-sub2sub2sub2
-Sub2
-Sub2sub1
-sub1sub2sub1
-sub1sub1sub2
-Sun2sub2
-sub2sub2sub1
-sub2sub2sub2
Don't want any code but is there any reference for implementing this..or just let me know is it possible or not..
Please help me to solve this question..
Thanks in advance.
Upvotes: 4
Views: 7766
Reputation: 15147
Finally I got my answer..
Using this Github link
Thanks Github...
Upvotes: 5
Reputation: 21805
TableView delegate method
tableView:indentationLevelForRowAtIndexPath:
can be used to indent rows according to your needs
Upvotes: 1
Reputation: 20410
I've done it before, and using this approach helped me a lot:
Implementing UITableView Tree Structure
If you need help of how to implement that solution, or if it doenst fit your problem, let us know and we will help you
Edit: I just realized you have one more level of depth that the link, but in your case you can use a header for the first level)
Upvotes: 0