marinofaggiana 5 jaren geleden
bovenliggende
commit
35ff44c8e3
3 gewijzigde bestanden met toevoegingen van 32 en 3 verwijderingen
  1. 1 0
      iOSClient/Main/CCMain.m
  2. 24 2
      iOSClient/Select/NCSelect.storyboard
  3. 7 1
      iOSClient/Select/NCSelect.swift

+ 1 - 0
iOSClient/Main/CCMain.m

@@ -1663,6 +1663,7 @@
     viewController.titleButtonDone = NSLocalizedString(@"_move_", nil);
     viewController.titleButtonDone1 = NSLocalizedString(@"_copy_", nil);
     viewController.isButtonDone1Hide = false;
+    viewController.isOverwriteHide = false;
     viewController.layoutViewSelect = k_layout_view_move;
     
     [navigationController setModalPresentationStyle:UIModalPresentationFullScreen];

+ 24 - 2
iOSClient/Select/NCSelect.storyboard

@@ -56,7 +56,7 @@
                                         </connections>
                                     </button>
                                     <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kze-s7-kTI">
-                                        <rect key="frame" x="192" y="20" width="70" height="30"/>
+                                        <rect key="frame" x="207" y="20" width="70" height="30"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="30" id="Hfn-8s-27i"/>
                                             <constraint firstAttribute="width" constant="70" id="S9y-Wh-wjq"/>
@@ -66,13 +66,34 @@
                                             <action selector="actionDone1:" destination="VYq-xA-D35" eventType="touchUpInside" id="pjY-Y0-8GF"/>
                                         </connections>
                                     </button>
+                                    <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bvU-cp-GX3">
+                                        <rect key="frame" x="137" y="15" width="60" height="40"/>
+                                        <subviews>
+                                            <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="obN-5M-keH">
+                                                <rect key="frame" x="12.5" y="0.0" width="37" height="25"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="25" id="c71-Rx-wA7"/>
+                                                    <constraint firstAttribute="width" constant="35" id="eQO-iB-kxo"/>
+                                                </constraints>
+                                            </switch>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <constraints>
+                                            <constraint firstItem="obN-5M-keH" firstAttribute="top" secondItem="bvU-cp-GX3" secondAttribute="top" id="6NF-88-omG"/>
+                                            <constraint firstAttribute="width" constant="60" id="Cb4-30-Orh"/>
+                                            <constraint firstItem="obN-5M-keH" firstAttribute="centerX" secondItem="bvU-cp-GX3" secondAttribute="centerX" id="FRm-bs-i20"/>
+                                            <constraint firstAttribute="height" constant="40" id="idi-T7-L9J"/>
+                                        </constraints>
+                                    </view>
                                 </subviews>
                                 <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
                                 <constraints>
+                                    <constraint firstItem="bvU-cp-GX3" firstAttribute="centerY" secondItem="un8-Xf-9Fb" secondAttribute="centerY" id="5zm-fz-w7y"/>
                                     <constraint firstItem="kze-s7-kTI" firstAttribute="centerY" secondItem="un8-Xf-9Fb" secondAttribute="centerY" id="899-zh-WyZ"/>
+                                    <constraint firstItem="kze-s7-kTI" firstAttribute="leading" secondItem="bvU-cp-GX3" secondAttribute="trailing" constant="10" id="KP4-eN-Eg7"/>
                                     <constraint firstAttribute="trailing" secondItem="gUK-Yw-aVP" secondAttribute="trailing" constant="18" id="OEt-Jd-Y4n"/>
                                     <constraint firstAttribute="height" constant="70" id="TsU-bO-Yu0"/>
-                                    <constraint firstItem="gUK-Yw-aVP" firstAttribute="leading" secondItem="kze-s7-kTI" secondAttribute="trailing" constant="25" id="YEP-mX-zEQ"/>
+                                    <constraint firstItem="gUK-Yw-aVP" firstAttribute="leading" secondItem="kze-s7-kTI" secondAttribute="trailing" constant="10" id="YEP-mX-zEQ"/>
                                     <constraint firstItem="gUK-Yw-aVP" firstAttribute="centerY" secondItem="un8-Xf-9Fb" secondAttribute="centerY" id="he9-pn-vUn"/>
                                     <constraint firstItem="QFB-w0-4Kc" firstAttribute="leading" secondItem="un8-Xf-9Fb" secondAttribute="leading" constant="10" id="pcs-Y5-Jp6"/>
                                     <constraint firstItem="QFB-w0-4Kc" firstAttribute="centerY" secondItem="un8-Xf-9Fb" secondAttribute="centerY" id="pzi-K5-nNo"/>
@@ -103,6 +124,7 @@
                         <outlet property="buttonDone" destination="gUK-Yw-aVP" id="oNt-6m-aHh"/>
                         <outlet property="buttonDone1" destination="kze-s7-kTI" id="XoG-Z1-Sc5"/>
                         <outlet property="collectionView" destination="0HI-k1-SD0" id="xme-mG-bnz"/>
+                        <outlet property="overwriteView" destination="bvU-cp-GX3" id="Wh1-Xr-CSQ"/>
                         <outlet property="toolbar" destination="un8-Xf-9Fb" id="RhD-n3-mlq"/>
                     </connections>
                 </viewController>

+ 7 - 1
iOSClient/Select/NCSelect.swift

@@ -31,11 +31,14 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
     
     @IBOutlet fileprivate weak var collectionView: UICollectionView!
     @IBOutlet fileprivate weak var toolbar: UIView!
+    @IBOutlet fileprivate weak var overwriteView: UIView!
 
     @IBOutlet fileprivate weak var buttonCancel: UIBarButtonItem!
     @IBOutlet fileprivate weak var buttonCreateFolder: UIButton!
     @IBOutlet fileprivate weak var buttonDone: UIButton!
-    @IBOutlet fileprivate var buttonDone1: UIButton!
+    @IBOutlet fileprivate weak var buttonDone1: UIButton!
+    
+    @IBOutlet fileprivate weak var overwrite: UISwitch!
 
     // ------ external settings ------------------------------------
     @objc var delegate: NCSelectDelegate?
@@ -48,6 +51,7 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
     @objc var titleButtonDone = NSLocalizedString("_move_", comment: "")
     @objc var titleButtonDone1 = NSLocalizedString("_copy_", comment: "")
     @objc var isButtonDone1Hide = true
+    @objc var isOverwriteHide = true
     @objc var layoutViewSelect = k_layout_view_move
     
     var titleCurrentFolder = NCBrandOptions.sharedInstance.brand
@@ -160,6 +164,8 @@ class NCSelect: UIViewController, UIGestureRecognizerDelegate, NCListCellDelegat
         buttonDone1.setTitle(titleButtonDone1, for: .normal)
         buttonDone1.isHidden = isButtonDone1Hide
         
+        overwriteView.isHidden = isOverwriteHide
+        
         if selectFile {
             buttonDone.isEnabled = false
             buttonDone.tintColor = UIColor.clear