Explorar el Código

Add isCryptoCloudMode

Marino Faggiana hace 8 años
padre
commit
a2c826612b
Se han modificado 1 ficheros con 18 adiciones y 8 borrados
  1. 18 8
      Picker/DocumentPickerViewController.swift

+ 18 - 8
Picker/DocumentPickerViewController.swift

@@ -138,17 +138,27 @@ class DocumentPickerViewController: UIDocumentPickerExtensionViewController, CCN
         self.tableView.separatorColor = UIColor(colorLiteralRed: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 0.2)
         self.tableView.tableFooterView = UIView()
         
-        // Encrypted mode
-        encryptedButton.image = UIImage(named:image_shareExtEncrypt)?.withRenderingMode(.automatic)
-
-        // Color Button
-        if parameterEncrypted == true {
-            encryptedButton.tintColor = colorEncrypted
+        // Crypto Cloud Mode
+        if isCryptoCloudMode == true {
+            
+            // Encrypted mode
+            encryptedButton.image = UIImage(named:image_shareExtEncrypt)?.withRenderingMode(.automatic)
+            
+            // Color Button
+            if parameterEncrypted == true {
+                encryptedButton.tintColor = colorEncrypted
+            } else {
+                encryptedButton.tintColor = self.view.tintColor
+                
+            }
+            
+            saveButton.tintColor = encryptedButton.tintColor
+            
         } else {
-            encryptedButton.tintColor = self.view.tintColor
             
+            encryptedButton.isEnabled = false
+            encryptedButton.tintColor = UIColor.clear
         }
-        saveButton.tintColor = encryptedButton.tintColor
         
         readFolder()
     }