ios

关于Storyboard () doesn't cont

2016-07-07  本文已影响433人  行走的风车

在编码时使用下面的方式获取对应的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、重新编译运行;

上一篇 下一篇

猜你喜欢

热点阅读