【发布时间】:2012-04-26 09:48:12
【问题描述】:
#import <UIKit/UIKit.h>
@interface FourthViewController : UIViewController{
//@interface FourthViewController : UITableViewController{
我想更新我的表格视图,所以我尝试使用[self.tableView reloadData],但我什至无法输入这行代码,因为我正在使用UIViewController,而tableView 属性仅适用于UITableViewController .所以我尝试变得聪明,只是将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.'
Imo 这很奇怪,因为 UITableViewController 可以为 tableView 工作,但反过来不行,但接缝好像我全都错了,或者这里发生了什么? 如果您需要更多代码=) 提前谢谢。
【问题讨论】:
标签: xcode uiviewcontroller uitableview reloaddata