فهرست منبع

fix video toolbar

marinofaggiana 3 سال پیش
والد
کامیت
b09fe6f201

+ 2 - 2
iOSClient/Viewer/NCViewerImage/NCViewerImage.storyboard

@@ -96,7 +96,7 @@
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sBp-t2-eFh" customClass="NCViewerVideoToolBar" customModule="Nextcloud" customModuleProvider="target">
-                                        <rect key="frame" x="25" y="28" width="364" height="100"/>
+                                        <rect key="frame" x="25" y="636" width="364" height="100"/>
                                         <subviews>
                                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8AB-hx-yqN">
                                                 <rect key="frame" x="324" y="10" width="30" height="30"/>
@@ -284,7 +284,6 @@
                                 </subviews>
                                 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
-                                    <constraint firstItem="sBp-t2-eFh" firstAttribute="bottom" secondItem="kPV-JM-UnM" secondAttribute="bottom" id="3tV-vr-w2H"/>
                                     <constraint firstItem="DAi-gz-qGP" firstAttribute="centerY" secondItem="2AU-85-K8y" secondAttribute="centerY" id="Lls-5R-JBM"/>
                                     <constraint firstAttribute="trailing" secondItem="DAi-gz-qGP" secondAttribute="trailing" constant="20" id="QWE-Iy-fcM"/>
                                     <constraint firstItem="kPV-JM-UnM" firstAttribute="leading" secondItem="CdQ-LC-Trx" secondAttribute="leading" id="asL-Ft-Lmc"/>
@@ -301,6 +300,7 @@
                             <constraint firstAttribute="bottom" secondItem="CdQ-LC-Trx" secondAttribute="bottom" id="4qB-8y-OcG"/>
                             <constraint firstItem="P8R-4f-zAl" firstAttribute="top" secondItem="Yo6-7W-moG" secondAttribute="bottom" constant="-400" id="B4O-kU-vwy"/>
                             <constraint firstAttribute="trailing" secondItem="CdQ-LC-Trx" secondAttribute="trailing" id="IwE-oE-d3Y"/>
+                            <constraint firstItem="Yo6-7W-moG" firstAttribute="bottom" secondItem="sBp-t2-eFh" secondAttribute="bottom" id="QHF-av-zeT"/>
                             <constraint firstItem="Yo6-7W-moG" firstAttribute="trailing" secondItem="sBp-t2-eFh" secondAttribute="trailing" constant="25" id="TCr-e0-gnG"/>
                             <constraint firstItem="2AU-85-K8y" firstAttribute="leading" secondItem="Yo6-7W-moG" secondAttribute="leading" constant="10" id="X10-OG-EKg"/>
                             <constraint firstItem="Yo6-7W-moG" firstAttribute="top" secondItem="2AU-85-K8y" secondAttribute="top" constant="-10" id="avO-83-uMQ"/>

+ 14 - 0
iOSClient/Viewer/NCViewerImage/NCViewerImageZoom.swift

@@ -192,6 +192,9 @@ class NCViewerImageZoom: UIViewController {
             // save start
             startImageViewTopConstraint = imageViewTopConstraint.constant
             startImageViewBottomConstraint = imageViewBottomConstraint.constant
+             
+            // VideoToolBar
+            self.videoToolBar.isHidden = true
             
         case .ended:
             
@@ -212,6 +215,17 @@ class NCViewerImageZoom: UIViewController {
                 }
             }
             
+            // VideoToolBar
+            if metadata.classFile == NCCommunicationCommon.typeClassFile.audio.rawValue || metadata.classFile == NCCommunicationCommon.typeClassFile.video.rawValue {
+                if detailView.isShow() {
+                    self.videoToolBar.isHidden = true
+                } else {
+                    DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
+                        self.videoToolBar.isHidden = false
+                    }
+                }
+            }
+            
         case .changed:
             
             if currentLocation.y < topPoint.y { topPoint = currentLocation }