Quicklook/QLPreviewController delegate methods are not calling in iOS 10 Xcode 8

大兔子大兔子 提交于 2019-11-30 20:16:50

I met this problem too, but I can't fix this issue by your solution.. Here is my code:

QLPreviewController *preview = [[QLPreviewController alloc] init];
[preview setDataSource:self];
[preview setDelegate:self];

if(SYSTEM_VERSION_LESS_THAN(@"10.0"))
{
    [self addChildViewController:preview];
}

[preview didMoveToParentViewController:self];
[self.view addSubview:preview.view]; 
Geoff Hackworth

This answer https://stackoverflow.com/a/41908926/870671 might also resolve the problem you are seeing. I'm presenting my QLPreviewController, not using view controller containment.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!