I’m working in an app with 1 master table view.
There are cells leading to a detailview after going through 1, 2 or 3 tableview levels based on certain parameters (for example BOOL sub).
The app behaviour is as follows:
UINavigationController -> UITableViewController (sub == YES) -> UITableViewController (sub == NO)-> DetailViewController
UINavigationController -> UITableViewController (sub == YES) -> UITableViewController (sub == YES) -> UITableViewController (sub == NO) -> DetailViewController
And so on (max 3 levels).
Someone knows how to do that (using storyboard) with just 1 UITableViewController?
First, define two “generic” segues called
"toDetail"and"toNextLevel"in the story board from your table view controller. One segue should lead to the detail controller; the other one should lead back to the table view controller. Then, implement thetableView:didSelectRowAtIndexPath:method with a condition that moves you to the next level when there is one, or to the detail screen when there is no next level: