Failed to instantiate the default view controller

本文介绍了解决iOS项目启动出现黑屏并提示错误信息的方法。通过设置Storyboard的入口控制器,可以避免因删除初始场景而导致的应用无法正常加载TableView的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >



学习IOS学徒第二本,书上说建立项目后,把初始scene删掉,重建一个Table View,这时Run会看到一个空白的Table List。

实际操作中,Run项目黑屏,提示"Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?"

应是删除初始Scene后未重设entry point。网上查到设置entry point方法如下:

选中entry Point的scene,  在其Attributes Inspector中的View Controller栏位,选中”Is Initial View Controller“。


方案原文链接: http://my.oschina.net/u/936286/blog/316565

Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?

这是因为给你的StoryBoard没有设置默认显示的controller,

解决方法:




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值