gpt4 book ai didi

swift 警告 : Cannot find preview item for proxy

转载 作者:行者123 更新时间:2023-11-28 06:47:47 25 4
gpt4 key购买 nike

我有一个应用程序可以将报告生成为 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com