Procházet zdrojové kódy

UI Trash : start edit mode

Marino Faggiana před 6 roky
rodič
revize
f79d43c1a0

+ 10 - 0
iOSClient/Trash/NCTrash.swift

@@ -18,6 +18,8 @@ class NCTrash: UIViewController ,UICollectionViewDataSource, UICollectionViewDel
     var datasource = [tableTrash]()
     var datasourceSorted = ""
     var datasourceAscending = true
+    var isEditMode = false
+    var selectFileID = [String]()
     
     var listLayout: ListLayout!
     var gridLayout: GridLayout!
@@ -597,6 +599,14 @@ class NCTrash: UIViewController ,UICollectionViewDataSource, UICollectionViewDel
             self.navigationController?.pushViewController(ncTrash, animated: true)
         }
     }
+    
+    func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {
+        
+        if !isEditMode {
+            return
+        }
+        
+    }
 }
 
 class ListLayout: UICollectionViewFlowLayout {

+ 9 - 0
iOSClient/Trash/NCTrashGridCell.xib

@@ -45,15 +45,24 @@
                             <constraint firstAttribute="height" constant="20" id="vGK-h7-x3M"/>
                         </constraints>
                     </imageView>
+                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DHy-Up-3Bh" userLabel="selected">
+                        <rect key="frame" x="97.5" y="97.5" width="25" height="25"/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="25" id="SoZ-J3-98x"/>
+                            <constraint firstAttribute="width" constant="25" id="cZG-gx-gwt"/>
+                        </constraints>
+                    </imageView>
                 </subviews>
             </view>
             <constraints>
                 <constraint firstItem="eU3-lY-fKr" firstAttribute="top" secondItem="5Ci-V1-hf5" secondAttribute="bottom" id="4Yq-Nh-z1l"/>
+                <constraint firstItem="DHy-Up-3Bh" firstAttribute="centerX" secondItem="5Ci-V1-hf5" secondAttribute="centerX" id="A2c-XO-Leg"/>
                 <constraint firstItem="VXh-sQ-LeX" firstAttribute="trailing" secondItem="eU3-lY-fKr" secondAttribute="trailing" id="Lu1-AM-kPq"/>
                 <constraint firstItem="5Ci-V1-hf5" firstAttribute="top" secondItem="VXh-sQ-LeX" secondAttribute="top" id="Ouj-ZD-UFm"/>
                 <constraint firstItem="VXh-sQ-LeX" firstAttribute="trailing" secondItem="5Ci-V1-hf5" secondAttribute="trailing" id="cHT-cP-NN6"/>
                 <constraint firstItem="VXh-sQ-LeX" firstAttribute="bottom" secondItem="5Ci-V1-hf5" secondAttribute="bottom" constant="45" id="eEC-eB-alE"/>
                 <constraint firstItem="eU3-lY-fKr" firstAttribute="leading" secondItem="VXh-sQ-LeX" secondAttribute="leading" id="gZe-FC-8XQ"/>
+                <constraint firstItem="DHy-Up-3Bh" firstAttribute="centerY" secondItem="5Ci-V1-hf5" secondAttribute="centerY" id="pph-kE-ffM"/>
                 <constraint firstItem="5Ci-V1-hf5" firstAttribute="leading" secondItem="VXh-sQ-LeX" secondAttribute="leading" id="qT3-WD-iTV"/>
                 <constraint firstItem="3sA-NC-kIg" firstAttribute="centerY" secondItem="EJs-Ro-nbe" secondAttribute="centerY" id="r4I-Ey-m5L"/>
                 <constraint firstItem="EJs-Ro-nbe" firstAttribute="top" secondItem="eU3-lY-fKr" secondAttribute="bottom" id="uL8-ea-AWa"/>