UITableView出现问题:继续获取此运行时错误无法识别的选择器 [英] UITableView woes: Keep on getting this runtime error unrecognised selector
问题描述
我有这个错误使我无法前进.我基本上有一个应用程序,其中包含指向单个UIViewControllers的UITabViewController.因此,其中一个标签是我要实现一个基本的TableViewController.
I have this error that is keeping me from moving forward. I basically have an application which contains a UITabViewController which points to individual UIViewControllers. So one of the tabs, I want to implement a basic TableViewController.
现在,无论我做什么,无论是剪切并粘贴实现UITableView的示例UIViewController代码,还是什至只是Xcode中的默认UITableViewController模板,我都在下面得到相同的错误:
Now, no matter what i do, whether its cut and paste sample UIViewController code that implements a UITableView, or whatever, or even just the default UITableViewController template from Xcode, i get the same error below:
2009-09-06 12:29:23.889 iKosher [12536:207] *-[UIViewController tableView:numberOfRowsInSection:]:无法识别的选择器已发送到实例0xe1d8d0 2009-09-06 12:29:23.891 iKosher [12536:207] * 由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'***-[UIViewController tableView:numberOfRowsInSection:]:无法识别的选择器已发送至实例0xe1d8d0' 2009-09-06 12:29:23.891 iKosher [12536:207]堆栈:( 807902715, 2492915529, 808284155, ...
2009-09-06 12:29:23.889 iKosher[12536:207] * -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0xe1d8d0 2009-09-06 12:29:23.891 iKosher[12536:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0xe1d8d0' 2009-09-06 12:29:23.891 iKosher[12536:207] Stack: ( 807902715, 2492915529, 808284155, ...
在IB中,我所做的只是将UITableView拖到视图上,并将其委托设置为指向文件所有者.
In IB, all I have done is drag onto the view a UITableView and set its delegates to point to the file owner.
不确定我还能从这里做什么
Not sure what else i can do from here
推荐答案
确保IB中的File Owner对象设置为您要实现的UITableViewController子类的实例,并且它具有tableView
链接到您的表格视图的插座.
Make sure that the File's Owner object in IB is set to be an instance of the UITableViewController subclass that you're implementing, and that it has a tableView
outlet that's linked to your table view.
这篇关于UITableView出现问题:继续获取此运行时错误无法识别的选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!