Преглед на файлове

【综合】减少Document创建

lizhe преди 7 месеца
родител
ревизия
4608012cfd
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      PDF Office/PDF Master/Class/Document/KMMainDocument.swift

+ 4 - 4
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -505,11 +505,11 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
         // Insert code here to read your document from the given data of the specified type, throwing an error in case of failure.
         // Alternatively, you could remove this method and override read(from:ofType:) instead.  If you do, you should also override isEntireFileLoaded to return false if the contents are lazily loaded.
         
-        let pdfDocument = CPDFDocument.init(data: data)
+//        let pdfDocument = CPDFDocument.init(data: data)
         self.pdfData = data
-        if pdfDocument == nil {
-            throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil)
-        }
+//        if pdfDocument == nil {
+//            throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil)
+//        }
     }
     
     // MARK: Autosaving