Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在UIViewController中包含leah PullRefreshTableviewController?_Ios_Xcode - Fatal编程技术网

Ios 如何在UIViewController中包含leah PullRefreshTableviewController?

Ios 如何在UIViewController中包含leah PullRefreshTableviewController?,ios,xcode,Ios,Xcode,我必须在现有的ios项目中包含leah pulltorefresh表视图。(https://github.com/leah/PullToRefresh) 现有表视图在xib文件中定义,并链接到控制器类(UIViewController的子类)中的一个出口 我的第一次尝试是让控制器继承PullToRefreshTableViewController(来自leah的项目),并在同一个控制器中添加refresh功能。但它不起作用,我有一个错误: *** Terminating app due to u

我必须在现有的ios项目中包含leah pulltorefresh表视图。(https://github.com/leah/PullToRefresh)

现有表视图在xib文件中定义,并链接到控制器类(UIViewController的子类)中的一个出口

我的第一次尝试是让控制器继承PullToRefreshTableViewController(来自leah的项目),并在同一个控制器中添加refresh功能。但它不起作用,我有一个错误:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "CampaignViewController" nib but didn't get a UITableView.'

由于PullToRefreshTableViewController是UITableViewController的一个子类,我想我不能让我的控制器继承它(对吗?)。我该怎么做?谢谢

尝试从头开始创建TableViewController,使其成为PullToRefreshTableViewController的子类


这比在IB中创建一个表视图、连接插座、然后填充所有必要的委托和数据源方法要简单得多。

您是否将
nib
文件也包括到您的项目中?我不确定您所说的是哪个文件,但实际上我有一个用于我的活动视图控制器的xib文件。