簡體   English   中英

QLPreviewController canPreviewItem不起作用

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM