ios - Have unknown length of navigation controllers in swift -
we making application use api returns array of tree structured json objects. objects have childs of same type, have childs of them self. wanna show these within tableview inside navigationcontroller.
so question how can make use of navigationcontroller recursively? don't know how many children's children they'll have.
example json format pastebin
update
trying explain better, i've created picture
my question how can dynamically add more uitableviewcontrollers? instead of creating hundreds of view controllers (picture shows 3)
you gave answer: recurse. delete table view controllers except first one. point push segue first table view controller at itself. pushing create instance of same kind of table view controller, want.
Comments
Post a Comment