5
4

2 に答える 2

12

Got it.

Replace the lines in the question with this:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard"
                                                     bundle:nil];
SecondViewController *viewController =
            [storyboard instantiateViewControllerWithIdentifier:@"SecondView"];
[self presentViewController:svc animated:YES completion:NULL];

Credit for this solution goes to IturPablo's self-answered question:
TabBarController, overwriting shouldSelectViewController to do a segue

于 2012-04-06T15:25:56.453 に答える
1

Are you looking for performSegueWithIdentifier:sender:? The docs seem to match your description:

"you can call this method to trigger a segue programmatically, perhaps in response to some action that cannot be specified in the storyboard resource file"

于 2012-04-05T14:43:12.370 に答える