Reputation: 1123
So I have a table view controller which lists a list of categories, each category has a parentid which is the id of another category.
By default, all the categories with parentid=0 are shown, and I have ctrl-dragged from the table view cell to the table view controller to link the view controller to itself; and i've written the code to change the contents of the table based on the category that was clicked on. (hope that part makes sense).
Basically, now I've hit a problem.
When I enter a category (or sub-category) with no category children, I want to then navigate to a different view controller, but I can't seem to find a way to create two segues from the table view cell.
Example...
User clicks food and drink from the first list 2nd list displays:
food
drink
"food" is clicked from this sub-list. Food has no sub-categories, so I want to display all the items for this category, using a different table view controller.
Does this make sense? I have heard about manual segues but I can't seem to get them working.
Upvotes: 0
Views: 1546
Reputation: 1153
You can programatically do a segue with:
self.navigationController performSegueWithIdentifier:(NSString *)identifier sender:(id)
Upvotes: 2