I am trying to instantiate a new view controller in my storyboard with this code but it does nothing and stays on the old storyboard.
Here is the code:
(void)menuSelect:(id)sender { UIButton *button = (UIButton*) sender; switch (button.tag) { case 0: { HomeViewController *hc=[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"Home"]; [self presentViewController:hc animated:YES completion:nil]; break; } The storyboard file name is Main.Storyboard and the id for the viewController is Profile.
Here is the image of what the storyboard looks like:
