'Could not find a storyboard named 'Main' in bundle NSBundle *** 是提示你缺少storyboard文件
如果你不需要storyboard文件,可以在info.plist文件把它的键删除
你也可以创建一个storyborad文件,取名为Main
这时候跑起来,程序还不是OK的,会有“Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?”错误提示,而且跑起来的程序屏幕是黑的
所以这里你首先要给这个新创建的storyboard文件拖进去一个ViewController并且为这个ViewController指定一个类
还要勾选“Is Initial View Controller”
Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?
本文详细介绍了在iOS应用开发过程中遇到找不到storyboard文件'Main'时的解决方案,包括如何创建并配置storyboard文件,以及解决默认视图控制器无法初始化的问题。通过为新创建的storyboard文件添加ViewController并指定类,以及勾选‘IsInitialViewController’选项,可以避免运行时出现的错误提示。此外,文章还提供了避免在info.plist中保留不必要的Storyboard键的方法。
249

被折叠的 条评论
为什么被折叠?



