I have an ios application using storyboards with a bunch of view controllers.
After Adding a new ViewController, and configured the identify (Storyboard ID)
I try to instantiate the new ViewController with the following code:
SurveyNewViewController *newSurvey = [[self storyboard] instantiateViewControllerWithIdentifier:@"newSurveyView"];
[self presentViewController:newSurvey animated:YES completion:nil];
Everything seems to be right, but when running the application on the simulator it crashes:
** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'Storyboard (<UIStoryboard: 0xa340fa0>) doesn't contain a view controller
with identifier 'newSurveyView''
Is there any possible explanation for this? I have used this same approach in different places on the system and it works well.
[self storyboard]
method? – Loram[self storyboard]
is a property from UIViewController. – Homonym