解决Failed to instantiate the default view controller for UIMainStoryboardFile 'Main'
来源:互联网 发布:最早的陶器知乎 编辑:程序博客网 时间:2024/05/22 12:05
Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?
这个问题困扰了好长时间,网上好多人给的方案是需勾选,实际上,创建工程时,自动声称的main。storyboard中,这个选项默认就是勾选的,但是还是报同样的错误。
解决方案如下:
1、在工程文件中新建一个storyboard,自定义名称(my.storyboard)
2、点击自动声称的main.storyboard中的空白处,(红色区域),敲击command+A选中storyboard中的所有内容,command+C复制
3、点击自己创建的my.storyboard,command+V粘贴,这时,原storyboard中的内容已全部复制到新创建的storyboard中
4、确认勾选Is initial View Controller
5、点击Run,这时可能会报错:loaded the “view” nib but the view outlet was not set,这是因为这里没有做与ViewController的关联
6、
,点击红色区域,拖拽至View Controller,松开鼠标,发现原来置灰的view已变成viewController
7、点击菜单栏Product下的clean,然后点击Run重新运行,正常通过
0 0
- Failed to instantiate the default view controller for UIMainStoryboardFile 'Main'
- Failed to instantiate the default view controller for UIMainStoryboardFile 'Main'
- 解决Failed to instantiate the default view controller for UIMainStoryboardFile 'Main'
- Failed to instantiate the default view controller for UIMainStoryboardFile
- Failed to instantiate the default view controller for UIMainStoryboardFile
- Failed to instantiate the default view controller for UIMainStoryboardFile
- Failed to instantiate the default view controller for UIMainStoryboardFile 'MainStoryboard'
- Failed to instantiate the default view controller for UIMainStoryboardFile
- Failed to instantiate the default view controller for UIMainStoryboardFile
- Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the desi
- Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the desi
- Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the desi
- Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the desi
- Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps
- iOS--错误集锦--Failed to instantiate the default view controller for UIMainStoryboardFile 'Main'
- X-code报错: Failed to instantiate the default view controller for UIMainStoryboardFile 'Main'
- [iOS]Failed to instantiate the default view controller for UIMainStoryboardFile 'Main'
- [Application]Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' ...
- Linux下安装mysql
- strong与weak的理解
- 【翻译自mos文章】在RAC database中怎么独立于instance来kill session?
- 8 ① AddGesture 保存自定义增加的手势
- [Objective-C]关联(objc_setAssociatedObject、objc_getAssociatedObject、objc_removeAssociatedObjects)
- 解决Failed to instantiate the default view controller for UIMainStoryboardFile 'Main'
- C语言中sizeof的用法
- junit4学习笔记
- OC-局部变量和全局变量、结构体、预处理指令以及关键字的基本使用
- 深入理解JAVA的多态性
- 自己看的和整理的一些经典技术博客列表BLOG
- C++学习笔记
- JS拖动效果实现
- URAL 1068. Sum (小学数学题)