Marino Faggiana 6 жил өмнө
parent
commit
31ae7de2cf

+ 7 - 4
iOSClient/Scan/Scan.storyboard

@@ -10,10 +10,10 @@
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
-        <!--Drag and Drop - CollectionView-->
+        <!--Drag Drop View Controller-->
         <scene sceneID="tne-QT-ifu">
             <objects>
-                <viewController id="BYZ-38-t0r" customClass="DragDropViewController" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController extendedLayoutIncludesOpaqueBars="YES" id="BYZ-38-t0r" customClass="DragDropViewController" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -176,7 +176,7 @@
                         </constraints>
                         <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
                     </view>
-                    <navigationItem key="navigationItem" title="Drag and Drop - CollectionView" id="zeb-Ex-mE8"/>
+                    <navigationItem key="navigationItem" id="zeb-Ex-mE8"/>
                     <connections>
                         <outlet property="collectionView1" destination="jwq-kF-6Nq" id="Bur-i1-50r"/>
                         <outlet property="collectionView2" destination="fGo-qU-AYi" id="TcD-xi-MVI"/>
@@ -191,11 +191,14 @@
             <objects>
                 <navigationController automaticallyAdjustsScrollViewInsets="NO" id="bdK-eL-mz4" sceneMemberID="viewController">
                     <toolbarItems/>
-                    <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="xl6-fB-rBw">
+                    <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" translucent="NO" id="xl6-fB-rBw">
                         <rect key="frame" x="0.0" y="20" width="375" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <nil name="viewControllers"/>
+                    <toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="byl-bn-jhW">
+                        <autoresizingMask key="autoresizingMask"/>
+                    </toolbar>
                     <connections>
                         <segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="3p3-I3-fyK"/>
                     </connections>

+ 8 - 3
iOSClient/Scan/ScanCollectionView.swift

@@ -21,6 +21,8 @@ class DragDropViewController: UIViewController
     override func viewDidLoad() {
         super.viewDidLoad()
         
+        self.navigationItem.title = NSLocalizedString("_scanned_images_", comment: "")
+        
         //CollectionView-1 drag and drop configuration
         self.collectionView1.dragInteractionEnabled = true
         self.collectionView1.dragDelegate = self
@@ -31,14 +33,17 @@ class DragDropViewController: UIViewController
         self.collectionView2.dropDelegate = self
         self.collectionView2.dragDelegate = self
         self.collectionView2.reorderingCadence = .fast //default value - .immediate
+
+        loadImage()
+    }
+    
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
         
         self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
         self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
-        
-        loadImage()
     }
     
-    
     private func loadImage() {
         do {
             let directoryContents = try FileManager.default.contentsOfDirectory(atPath: CCUtility.getDirectoryScan()!)