I'm trying to recreate a small iOS app that utilized nib files. I'm trying to replace the following line of code
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
with:
UIStoryboard* sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController* viewController = [sb instantiateViewControllerWithIdentifier:@"viewController"]; self.window.rootViewController = self. viewController;
I'm getting the following error: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard () doesn't contain a view controller with identifier 'viewController''
I got the latter code from a previous Stack Overflow question on a similar topic. Can someone please advise on what the issue I'm having is and how to proceed?