作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个应用程序可以将报告生成为 pdf 文件。我可以生成 pdf 文件,但我收到一条警告:“找不到代理的预览项目:- CalculationSheet.pdf (0)”
有什么建议告诉我为什么会收到这个错误吗?我可以放置哪个断点以跟踪此错误的原因。
最佳答案
// returns the item that the preview controller should preview
-(id)previewController:(QLPreviewController *)previewController previewItemAtIndex:(NSInteger)idx
{
NSURL *fileURL = nil;
NSIndexPath *selectedIndexPath = [self.tableView indexPathForSelectedRow];
if (selectedIndexPath.section == 0)
{
fileURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:documents[idx] ofType:nil]];
}
else
{
fileURL = [self.documentURLs objectAtIndex:idx];
}
return fileURL;
}
关于 swift 警告 : Cannot find preview item for proxy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35828373/
我是一名优秀的程序员,十分优秀!