user2813740 user2813740 - 21 days ago 5
iOS Question

achieve tree view like structure in iPhone App

i am trying to achieve tree like structure as shown in below image on my iPhone App

Package 1 =>
Packg 1.1
Package 1.1.1
Package 1.1.2
Packg 1.2

its like user received Package having 3 bottles send by vendors. either vendor has package each bottle as sub package or directly al three bottles within single package.
individual bottle is termed as Item and Package as Packages.

there is Package0010 as main package and depending on bottle packaging we either subdivide as three sub package having 1 item each. or two sub package(two item) and one separate item so total 3 Item or bottles.

How i can achieve below structure.
Note i am using UILAble, UITexfield, UITexfield with tags. i can not use uitableview ...

just idea if anyone came across such problem...

Answer

I use RATreeView component for similar tasks. It is used like UITableView with datasource and delegate protocols, and it is highly customisable.

https://github.com/Augustyniak/RATreeView