I am trying to load a storyboard file from a XIB file when a button is clicked. So in the IBAction
method I have called the following line:
- (I
You are setting the class name of the view controller only. I can see that the storyboard ID filed as empty. Set the Storyboard ID to StoryViewController in the Identity section
- (IBAction)NextView:(id)sender
{
UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
StoryViewController *storyViewController = [mainStoryBoard instantiateViewControllerWithIdentifier:@"StoryViewController"];
[self presentViewController:storyViewController animated:YES completion:nil]; // present it
//[self.navigationController pushViewController:storyViewController animated:YES];// or push it
}