marinofaggiana 3 жил өмнө
parent
commit
3582e7bcdb

+ 3 - 0
iOSClient/Viewer/NCViewerImage/NCViewerImage.swift

@@ -567,6 +567,9 @@ extension NCViewerImage: UIGestureRecognizerDelegate {
             
             currentMode = .full
         }
+        
+        // Detail Text Color
+        currentViewerImageZoom?.detailView.textColor(textColor)
     }
 }
 

+ 5 - 1
iOSClient/Viewer/NCViewerImage/NCViewerImageDetailView.swift

@@ -71,12 +71,16 @@ class NCViewerImageDetailView: UIView {
         locationButton.setTitle("" , for: .normal)
     }
     
-    func show(textColor: UIColor?) {
+    func textColor(_ textColor: UIColor?) {
         sizeValue.textColor = textColor
         dateValue.textColor = textColor
         dimValue.textColor = textColor
         lensModelValue.textColor = textColor
         separator.backgroundColor = NCBrandColor.shared.separator
+    }
+    
+    func show(textColor: UIColor?) {
+        self.textColor(textColor)
         isHidden = false
     }
     

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

@@ -173,20 +173,20 @@ class NCViewerImageZoom: UIViewController {
             imageViewBottomConstraint.constant = -(currentLocation.y - imageViewConstraint)
             
             // DISMISS VIEW
-            if detailView.isHidden && (currentLocation.y > 10) {
+            if detailView.isHidden && (currentLocation.y > 20) {
                 
                 delegate?.dismissImageZoom()
             }
             
             // CLOSE DETAIL
-            if !detailView.isHidden && (currentLocation.y > 10) {
+            if !detailView.isHidden && (currentLocation.y > 20) {
                                
                 self.closeDetail()
                 gestureRecognizer.state = .ended
             }
 
             // OPEN DETAIL
-            if detailView.isHidden && (currentLocation.y < -10) {
+            if detailView.isHidden && (currentLocation.y < -20) {
                        
                 self.openDetail()
                 gestureRecognizer.state = .ended
@@ -220,7 +220,8 @@ class NCViewerImageZoom: UIViewController {
             let ratioH = imageView.frame.height / image.size.height
             let ratio = ratioW < ratioH ? ratioW : ratioH
             let imageHeight = image.size.height * ratio
-            self.imageViewConstraint = self.detailView.frame.height - ((self.view.frame.height - imageHeight) / 2)
+            imageViewConstraint = self.detailView.frame.height - ((self.view.frame.height - imageHeight) / 2) + self.view.safeAreaInsets.bottom
+            if imageViewConstraint < 0 { imageViewConstraint = 0 }
         }
         
         UIView.animate(withDuration: 0.3) {