UITableview tree structure implementation

Can we create a tree structure in a UITableView as shown below.

-Sub1 //First row -Sub1sub1 //First row child -sub1sub1sub1 //Child child etc.. -sub1sub1sub2 -Sun1sub2 -sub2sub2sub1 -sub2sub2sub2 -Sub2 -Sub2sub1 -sub1sub2sub1 -sub1sub1sub2 -Sun2sub2 -sub2sub2sub1 -sub2sub2sub2 

I don't want any code, but are there any links to implement it ... or just let me know if this is possible or not.

Please help me resolve this issue.

Thanks in advance.

+4
source share
3 answers

Finally, I got my answer.

Using this Github Link

Thanks Github ...

+5
source

TableView delegate method

  tableView:indentationLevelForRowAtIndexPath: 

can be used for indentation according to your needs

+1
source

I have done this before, and using this approach has helped me a lot:

Implementing a Tree Structure UITableView

If you need help on how to implement this solution, or if it matches your problem, let us know and we will help you

Editing: I only realized that you have another level of depth, that link, but in your case you can use the header for the first level)

0
source

Source: https://habr.com/ru/post/1399756/


All Articles