#import <UIKit/UIKit.h>
@interface FourthViewController : UIViewController{
//@interface FourthViewController : UITableViewController{
我想更新我的表格视图,所以我尝试使用[self.tableView reloadData],但我什至无法输入这行代码,因为我在 a 中工作,UIViewController并且该tableView属性仅适用于UITableViewController's。所以我试图变得聪明,只是将其更改UIViewController为UITableViewController但我得到了这个错误:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "b4k-XH-Uhj-view-V2h-dE-ixJ" nib but didn't get a UITableView.'
我觉得这很奇怪,因为 UITableViewController 可以为 tableView 工作,但反过来不行,但是接缝就像我弄错了,或者这里发生了什么?如果您需要更多代码 =) 提前谢谢。