![](/img/trans.png)
[英]QLPreviewController canPreviewItem: can't work for judging broken files
[英]QLPreviewController canPreviewItem doesn't work
看來QLPreViewController的方法+ canPreviewItem不起作用。
我已經在xls文檔的currentAttachment值路徑下,但這是xlsx文檔。
if (![QLPreviewController canPreviewItem:[NSURL fileURLWithPath:self.currentAttachment]])
{
NSLog(@"Can't Preview Item");
}
該方法返回YES,但不會生成預覽。
所以它是保存為xls的xlsx文件。 而且我正在嘗試了解是否可以預覽它,如果沒有,我正在嘗試預覽xlsx文件等。
但總是說我可以。
嘗試if(![QLPreviewController canPreviewItem:myPreviewItem.currentPreviewItem]) { NSLog(@"Can't preview item");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.