gpt4 book ai didi

ios - Storyboard "Main",但在使用 UITableViewController 时没有获得 UITableView

转载 作者:IT王子 更新时间:2023-10-29 08:01:57 25 4
gpt4 key购买 nike

我一直在经历这个tutorial , “选项 2:原型(prototype)细胞”我执行了所有步骤,但是,以下代码给我一个错误:

@interface MTViewController : UITableViewController

@end

错误信息是:

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

这是我尝试过的 - 我将 UITableViewController 更改为 UIViewController 并且错误消失了。但是,表格 View 仍然是空白的。你能告诉我这是为什么吗?

最佳答案

在 Storyboard中,您需要将 UITableViewController 的 Root View 设为 UITableView

Interface Builder Table View Controller

Interface Builder Custom Class

关于ios - Storyboard "Main",但在使用 UITableViewController 时没有获得 UITableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32875298/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com