Browse Source

actionSheet.animationDuration = 0.2

Marino Faggiana 8 years ago
parent
commit
ebae6535cc

+ 33 - 1
iOSClient/Create/CCCreateCloud.swift

@@ -30,6 +30,7 @@ class CreateMenu: NSObject {
         let appDelegate = UIApplication.shared.delegate as! AppDelegate
         let actionSheet = AHKActionSheet.init(view: view, title: nil)
         
+        actionSheet?.animationDuration = 0.2
         actionSheet?.blurRadius = 1.0
         actionSheet?.buttonHeight = 50.0
         actionSheet?.cancelButtonHeight = 50.0
@@ -52,9 +53,40 @@ class CreateMenu: NSObject {
         })
         
         actionSheet?.addButton(withTitle: "Upload Encrypted file", image: UIImage(named: "actionSheetLock"), type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
-            NSLog("Share tapped")
+            self.createMenuEncrypted(view: view)
         })
         
         actionSheet?.show()
     }
+    
+    func createMenuEncrypted(view : UIView) {
+        
+        let appDelegate = UIApplication.shared.delegate as! AppDelegate
+        let actionSheet = AHKActionSheet.init(view: view, title: nil)
+        
+        actionSheet?.animationDuration = 0.2
+        actionSheet?.blurRadius = 1.0
+        actionSheet?.buttonHeight = 50.0
+        actionSheet?.cancelButtonHeight = 50.0
+        actionSheet?.selectedBackgroundColor = UIColor(colorLiteralRed: 0.0/255.0, green: 130.0/255.0, blue: 201.0/255.0, alpha: 0.1)
+        actionSheet?.buttonTextAttributes = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 17)!, NSForegroundColorAttributeName:UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
+        actionSheet?.encryptedButtonTextAttributes = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 17)!, NSForegroundColorAttributeName:UIColor(colorLiteralRed: 241.0/255.0, green: 90.0/255.0, blue: 34.0/255.0, alpha: 1.0)]
+        actionSheet?.separatorColor = UIColor(colorLiteralRed: 153.0/255.0, green: 153.0/255.0, blue: 153.0/255.0, alpha: 0.2)
+        actionSheet?.cancelButtonTitle = NSLocalizedString("_cancel_", comment: "")
+        
+        actionSheet?.addButton(withTitle: "Create a new folder", image: UIImage(named: "foldercrypto"), type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
+            appDelegate.activeMain.returnCreate(Int(returnCreateFolderEncrypted))
+        })
+        
+        actionSheet?.addButton(withTitle: "Upload photos and videos", image: UIImage(named: "photocrypto"), type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
+            appDelegate.activeMain.returnCreate(Int(returnCreateFotoVideoEncrypted))
+        })
+        
+        actionSheet?.addButton(withTitle: "Upload a file", image: UIImage(named: "importCloudCrypto"), type: AHKActionSheetButtonType.encrypted, handler: {(AHKActionSheet) -> Void in
+            appDelegate.activeMain.returnCreate(Int(returnCreateFileEncrypted))
+        })
+        
+        actionSheet?.show()
+    }
+
 }

BIN
iOSClient/Images.xcassets/importCloudCrypto.imageset/importCloudCrypto.png


BIN
iOSClient/Images.xcassets/importCloudCrypto.imageset/importCloudCrypto@2x.png


BIN
iOSClient/Images.xcassets/importCloudCrypto.imageset/importCloudCrypto@3x.png


BIN
iOSClient/Images.xcassets/photocrypto.imageset/photocrypto.png


BIN
iOSClient/Images.xcassets/photocrypto.imageset/photocrypto@2x.png


BIN
iOSClient/Images.xcassets/photocrypto.imageset/photocrypto@3x.png


+ 3 - 0
iOSClient/Main/CCMain.m

@@ -4249,6 +4249,7 @@
         
         AHKActionSheet *actionSheet = [[AHKActionSheet alloc] initWithView:self.view title:nil];
         
+        actionSheet.animationDuration = 0.2;
         actionSheet.blurRadius = 1.0f;
         actionSheet.buttonHeight = 50.0;
         actionSheet.cancelButtonHeight = 50.0f;
@@ -4379,6 +4380,7 @@
         
         AHKActionSheet *actionSheet = [[AHKActionSheet alloc] initWithView:self.view title:nil];
         
+        actionSheet.animationDuration = 0.2;
         actionSheet.blurRadius = 1.0f;
         actionSheet.buttonHeight = 50.0;
         actionSheet.cancelButtonHeight = 50.0f;
@@ -4509,6 +4511,7 @@
      
         AHKActionSheet *actionSheet = [[AHKActionSheet alloc] initWithView:self.view title:nil];
      
+        actionSheet.animationDuration = 0.2;
         actionSheet.blurRadius = 1.0f;
         actionSheet.buttonHeight = 50.0;
         actionSheet.cancelButtonHeight = 50.0f;