marinofaggiana 4 lat temu
rodzic
commit
4e8000f574

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

@@ -109,7 +109,7 @@
                                         <nil key="highlightedColor"/>
                                     </label>
                                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P8R-4f-zAl" customClass="NCViewerImageDetailView" customModule="Nextcloud" customModuleProvider="target">
-                                        <rect key="frame" x="15" y="300" width="384" height="200"/>
+                                        <rect key="frame" x="15" y="500" width="384" height="200"/>
                                         <subviews>
                                             <mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="Typ-A8-XIO">
                                                 <rect key="frame" x="0.0" y="30" width="384" height="140"/>
@@ -139,6 +139,7 @@
                                 </subviews>
                                 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
+                                    <constraint firstItem="P8R-4f-zAl" firstAttribute="top" secondItem="CdQ-LC-Trx" secondAttribute="top" constant="500" id="4o4-cy-XLC"/>
                                     <constraint firstItem="P8R-4f-zAl" firstAttribute="centerX" secondItem="CdQ-LC-Trx" secondAttribute="centerX" id="7h7-Y9-WNZ"/>
                                     <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"/>
@@ -147,7 +148,6 @@
                                     <constraint firstItem="DAi-gz-qGP" firstAttribute="leading" secondItem="2AU-85-K8y" secondAttribute="trailing" constant="8" symbolic="YES" id="q8N-jc-KHs"/>
                                     <constraint firstItem="kPV-JM-UnM" firstAttribute="top" secondItem="CdQ-LC-Trx" secondAttribute="top" id="tdo-XY-uqv"/>
                                     <constraint firstAttribute="bottom" secondItem="kPV-JM-UnM" secondAttribute="bottom" id="xTI-ae-JfJ"/>
-                                    <constraint firstItem="P8R-4f-zAl" firstAttribute="top" secondItem="CdQ-LC-Trx" secondAttribute="top" constant="300" id="xz3-xU-Y6w"/>
                                 </constraints>
                             </scrollView>
                         </subviews>
@@ -167,7 +167,7 @@
                     <connections>
                         <outlet property="detailView" destination="P8R-4f-zAl" id="xFW-qq-Cdi"/>
                         <outlet property="detailViewHeightConstraint" destination="z82-KD-lOv" id="3r0-5o-11L"/>
-                        <outlet property="detailViewTopConstraint" destination="xz3-xU-Y6w" id="vdF-VT-1V7"/>
+                        <outlet property="detailViewTopConstraint" destination="4o4-cy-XLC" id="Dm2-wn-Gmv"/>
                         <outlet property="imageView" destination="kPV-JM-UnM" id="TEv-Tc-8pu"/>
                         <outlet property="imageViewBottomConstraint" destination="xTI-ae-JfJ" id="vdW-Ma-BV1"/>
                         <outlet property="imageViewLeadingConstraint" destination="asL-Ft-Lmc" id="4cu-ey-QS1"/>

+ 4 - 2
iOSClient/Viewer/NCViewerImage/NCViewerImageZoom.swift

@@ -178,8 +178,6 @@ class NCViewerImageZoom: UIViewController {
             if target.center.y < view.center.y - panDistanceForDetailView {
                 
                 if !detailView.hasData() { return }
-
-                detailViewHeightConstraint.constant = (view.frame.width / 3) * 2
                 
                 isOpenDetailView = true
             }
@@ -220,6 +218,10 @@ class NCViewerImageZoom: UIViewController {
         imageViewLeadingConstraint.constant = xOffset
         imageViewTrailingConstraint.constant = xOffset
                         
+        // detail
+        detailViewTopConstraint.constant = view.bounds.size.height / 2
+        detailViewHeightConstraint.constant = (view.bounds.width / 3) * 2
+
         view.layoutIfNeeded()
 
         let contentHeight = yOffset * 2 + imageView.frame.height