关于Storyboard () doesn't contain a view controller with identifier解决方法

在编码时使用下面的方式获取对应的ViewController:
MyViewController* vc=[self.storyboard instantiateViewControllerWithIdentifier:@"MyViewController"];

遇到以下错误:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard () doesn't contain a view controller with identifier 'MyViewController''时,可尝试:
1、删除Xcode项目目录下Products文件夹已生成的app文件;
2、清理工程;
3、重新编译运行;

你可能感兴趣的:(关于Storyboard () doesn't contain a view controller with identifier解决方法)