Storyboard在ios模拟器无法显示的问题

错误警告:

  warning: Unsupported Configuration: Scene is unreachable due to lack of entry points and does not have an identifier for runtime access via -instantiateViewControllerWithIdentifier:.

问题产生过程:

  1.新建一个名称为test的storyboard类型的文件。

2.test.storyboard添加View Controller,并设置View Controller下View的背景颜色Background为深蓝色。

3.设置Main Interface为test.storyboard。

4.启动调试,ios模拟器下显示为黑色界面。

原因分析:

默认新建的storyboard没有设置为Is Initial View Controller(初始视图控制器),也就是说test.storyboard没有设置为Is Initial View Controller。

解决办法:

在test.storyboard中,切换到属性检查器,找到View Controller分类下的is initial view controller并勾上它。这样,程序启动后,会加载test.storyboard下的视图。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值