In examples I have seen of UINavigationContoller and UITableView, switching to next view is usually triggered by tapping into that cell and pushing a different UIViewController on top of stack, but what I want is to switch to next view by pressing a next button in bottom of page, which I want it to load the same UITableViewController again but with different contents in each cell.
-Can I put that next button on bottom of page? and where
-Can I call the same controller (but showing different contents) and put on top of stack using the UINavigationController?
Because I want to be able to browse back previos pages.
You would generally do as you highlighted first and push a new
UIViewControllersubclass onto theUINavigationController.A
UIViewControlleris supposed to manage one screens worth of content. If you plan on breaking that convention by presenting different information you are essentially going to have duplicatedifstatements to decide whether the user should be viewing the content from before or after the button was tapped.UINavigationController‘s are good for hierarchal data where the content becomes more specific as you drill down. TheUINavigationControllerwill also manage the stack so that you can go to previous pages.To achieve what you want to achieve (stated here) you should be using a
UINavigationControllerwith your custom subclass ofUITableViewControllerwhen the user submits questions you receive your xml, parse it and then instantiate a new instance of yourUITableViewControllersubclass and push it onto the stack.