Reputation: 727
I would like to have a menu like this: A->B->C
A=> is a table view controller (Top level Menu)
B=> is also a table view controller
C=> UIView controller to display some details.
I was able to do till A in the storyboard which is shown by "Movie types". But how do I add the next table view controller ? I cannot just drag and drop another "Table view controller" and link it to the previous table view controller, right ? I am able to do it via code by pushing the next table view controller. But I want to learn it via Storyboard too. I am using Xcode 4.5.
Upvotes: 2
Views: 2425
Reputation: 385998
To do it in a storyboard, drag out your B view controller and connect A to B with a push segue. Use the Attributes Inspector to give the push segue an identifier like pushB
.
In your A view controller code, trigger the push segue using [self performSegueWithIdentifier:@"pushB" sender:self]
.
Also in your A view controller, implement the prepareForSegue:sender:
method to configure the new B view controller (accessible as segue.destinationViewController
) based the selected row in A's table.
You can then do the same things to connect B to C.
Upvotes: 3