错误'-[UITableViewController loadView] instantiated view controller with identifier "CDHomeTableVC" from storyboard "Main", but didn't get a UITableView.'

最近在写swift时候老是遇到这个错误后面找了些资料总结下记录下错误原因:

  在写代码时候我在Storyboard 第一次拖得是个ViewController 普通视图,但是后面项目需求改变了视图,需要的是tableViewController,更换后运行就会报下面错误:instantiated view controller with identifier "CDHomeTableVC" from storyboard "Main", but didn't get a UITableView.' 后面查看资料才知道在tableViewController 没有view  而ViewController普通视图中有view 我把view 删除后运行就没有问题,应该是我tableView 直接覆盖在view 导致的问题,删除后就没有任何问题以后得注意Storyboard配套使用。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2022-01-11
  • 2021-04-18
  • 2021-10-27
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案