链接数据源时uitablleview崩溃

Rut*_*h85 -1 iphone xcode objective-c uitableview asihttprequest

我正在调用一个包含tableview的视图,并且在我将datsource链接到文件的所有者并生成以下SIGABRT错误之前正确显示.我不明白发生了什么,因为我在其他视图和工作中设置了tableview!问题与此线程相同,因为我也在使用ASIHttprequest:

SIGABRT启动时

 2011-10-13 00:53:36.633 Nimbo[1713:207] -[testViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x5c6fa30
    2011-10-13 00:53:36.639 Nimbo[1713:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[testViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x5c6fa30'
    *** Call stack at first throw:
Run Code Online (Sandbox Code Playgroud)

0x8*_*00d 5

您是否在viewController中实现了此方法:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
Run Code Online (Sandbox Code Playgroud)

因为你缺少这个必需的Delegate方法视图控制器符合你的类上的UITableViewDataSource协议调用所需的方法,因为你没有实现它崩溃.当您编译代码时,您可能已将此作为警告,表示您不符合此协议