I understand how to create a segue in XCode 4.2 by right clicking a control, let's say a button, and dragging it to a view controller in the storyboard.
What I would like to do is create a segue that is not tied to a control, and must be invoked programmatically so I can do something like this:
- (void)viewDidLoad
{
if (condition)
{
[self performSegueWithIdentifier: @"identifier" sender: self];
}
}
while still defining the "identifier" segue within Interface Builder. Is this possible?
You can ctrl-drag from the source view controller to the other scene. You can use the view controller object at the bottom of the scene to do this.
Then of course give it the appropriate identifier and then your code above should work fine.
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With