Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.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
Ios5 子类化QLViewController时未调用数据源方法_Ios5_Ios6_Qlpreviewcontroller - Fatal编程技术网

Ios5 子类化QLViewController时未调用数据源方法

Ios5 子类化QLViewController时未调用数据源方法,ios5,ios6,qlpreviewcontroller,Ios5,Ios6,Qlpreviewcontroller,我正在使用qlviewcontroller显示文档,以删除我正在子类化qlviewcontroller的共享按钮,如下所示 @interface QuickLookViewController : QLPreviewController{ } 我正在使用下面的类 QuickLookViewController *previewer = [[QuickLookViewController alloc] init]; // Set data source [previewer setDataSo

我正在使用
qlviewcontroller
显示文档,以删除我正在子类化
qlviewcontroller
的共享按钮,如下所示

@interface QuickLookViewController : QLPreviewController{

}
我正在使用下面的类

QuickLookViewController *previewer = [[QuickLookViewController alloc] init];
// Set data source
[previewer setDataSource:self];
// Which item to preview
[previewer setCurrentPreviewItemIndex:indexPath.row];
// Push new viewcontroller, previewing the document
[[self navigationController] pushViewController:previewer animated:YES];
但是数据源方法没有调用


有人能帮我吗。

您的接口必须告诉我它正在实现回调

@interface QuickLookViewController : QLPreviewController
<QLPreviewControllerDataSource, QLPreviewControllerDelegate>
@界面QuickLookViewController:QLPreviewController

在类名后的箭头括号中添加协议名

谢谢您的回复Jom获得了解决方案您是如何删除共享按钮的?