故事板“Main”,但在使用UITableViewController时没有获得UITableView [英] Storyboard "Main", but didn't get a UITableView when using UITableViewController

查看:98
本文介绍了故事板“Main”,但在使用UITableViewController时没有获得UITableView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在浏览




I have been going through this tutorial, "Option 2: Prototype Cells" I implimented all the steps, but, the following code gives me an error:

@interface MTViewController : UITableViewController

@end

the error message is:

instantiated view controller with identifier "UIViewController-BYZ-38-t0r" from storyboard "Main", but didn't get a UITableView.'

Here is what I tried - I changed UITableViewController to UIViewController and the error went away. But, the tableview remains blank. Can you tell me why this is ?

解决方案

In your storyboard, you need to make the root view of your UITableViewController a UITableView.

这篇关于故事板“Main”,但在使用UITableViewController时没有获得UITableView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆