Marino Faggiana 6 years ago
parent
commit
7971475b0c

+ 3 - 1
iOSClient/Create/CCCreateCloud.swift

@@ -69,11 +69,13 @@ class CreateMenuAdd: NSObject {
             appDelegate.activeMain.openAssetsPickerController()
         })
         
+#if DEBUG
         if #available(iOS 11.0, *) {
             actionSheet.addButton(withTitle: NSLocalizedString("_scans_document_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "scan"), multiplier:2, color: colorGray), backgroundColor: NCBrandColor.sharedInstance.backgroundView, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
                 NCCreateScanDocument.sharedInstance.openScannerDocument(viewController: appDelegate.activeMain)
             })
         }
+#endif
         
         actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: "file"), multiplier:2, color: colorGray), backgroundColor: NCBrandColor.sharedInstance.backgroundView, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
             appDelegate.activeMain.openImportDocumentPicker()
@@ -712,7 +714,7 @@ class NCCreateScanDocument : NSObject, ImageScannerControllerDelegate {
         } catch { }
         
         let storyboard = UIStoryboard(name: "Scan", bundle: nil)
-        let controller = storyboard.instantiateInitialViewController()! //(withIdentifier: "ScanNC")
+        let controller = storyboard.instantiateInitialViewController()!
         controller.modalPresentationStyle = UIModalPresentationStyle.pageSheet
         appDelegate.activeMain.present(controller, animated: true, completion: nil)
         

+ 10 - 1
iOSClient/Main/CCMore.swift

@@ -114,6 +114,15 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
         item.url = "segueShares"
         functionMenu.append(item)
         
+#if DEBUG
+        // ITEM : Scan
+        item = OCExternalSites.init()
+        item.name = "_scan_"
+        item.icon = "scan"
+        item.url = "Scanopen"
+        functionMenu.append(item)
+#endif
+        
         // ITEM : External
         
         if NCBrandOptions.sharedInstance.disable_more_external_site == false {
@@ -376,7 +385,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
             //let nameStoryboard = item.url.substring(from: item.url.index(item.url.startIndex, offsetBy: 4))
             
             let storyboard = UIStoryboard(name: nameStoryboard, bundle: nil)
-            let controller = storyboard.instantiateViewController(withIdentifier: nameStoryboard)
+            let controller = storyboard.instantiateInitialViewController()! //instantiateViewController(withIdentifier: nameStoryboard)
             self.present(controller, animated: true, completion: nil)
             
         } else if item.url.contains("//") {

+ 3 - 0
iOSClient/Scan/ScanCollectionView.swift

@@ -32,6 +32,9 @@ class DragDropViewController: UIViewController
         self.collectionView2.dragDelegate = self
         self.collectionView2.reorderingCadence = .fast //default value - .immediate
         
+        self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
+        self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+        
         loadImage()
     }