2017-01-23 52 views
0

我試圖過濾掉所有不是圖像,視頻,音頻,PDF和其他文檔文件的文件,例如微軟。Xamarin iOS:過濾文檔選擇器上的文件類型顯示

目前,我有這個在我的代碼:

var allowedUTIs = new string[] { 
      UTType.Image, 
      UTType.PDF, 
      UTType.Video, 
      UTType.Audio, 
      UTType.Movie, 
      UTTYPE.Text, 
      "com.microsoft.word.doc", 
      "com.microsoft.excel.xls", 
      "com.microsoft.powerpoint.ppt", 
      "org.openxmlformats.wordprocessingml.document" 
     }; 

主要關注的是自定義的類型。它是否覆蓋了所有的Microsoft Office文件類型:doc,xls,ppt,docx等...

是否有任何其他文檔類型我沒有涉及蘋果的特定文檔文件。

回答

2
 var allowedUtis = new string[] { 
      UTType.UTF8PlainText, 
      UTType.PlainText, 
      UTType.RTF, 
      UTType.PNG, 
      UTType.Text, 
      UTType.PDF, 
      UTType.Image, 
      UTType.UTF16PlainText, 
      UTType.FileURL, 
      "com.microsoft.word.doc", 
      "org.openxmlformats.wordprocessingml.document", 
      "com.microsoft.powerpoint.​ppt" 
      "org.openxmlformats.spreadsheetml.sheet", 
      "org.openxmlformats.presentationml.presentation", 
      "com.microsoft.excel.xls" 
     }; 

這些都是我UTTypes,

在此,對於文檔 「com.microsoft.word.doc」,爲DOCX 「org.openxmlformats.wordprocessingml.document」 等。我已經針對所有文檔進行了測試。

相關問題