marinofaggiana 4 年 前
コミット
d3b4dd0d7f
1 ファイル変更5 行追加4 行削除
  1. 5 4
      iOSClient/Viewer/NCViewerImage/NCViewerImageZoom.swift

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

@@ -224,11 +224,12 @@ class NCViewerImageZoom: UIViewController {
                     gestureRecognizer.state = .ended
                      
                     UIView.animate(withDuration: 0.3) {
-                        let detailHeight = self.detailView.frame.height
-                        self.imageViewTopConstraint.constant = self.startImageViewTopConstraint - detailHeight
-                        self.imageViewBottomConstraint.constant = self.startImageViewBottomConstraint + detailHeight
-                        self.detailViewTopConstraint.constant = -(self.startImageViewBottomConstraint + detailHeight)
+                        self.imageViewTopConstraint.constant = self.startImageViewTopConstraint - self.detailView.frame.height
+                        self.imageViewBottomConstraint.constant = self.startImageViewBottomConstraint + self.detailView.frame.height
+                        self.detailViewTopConstraint.constant = -self.imageViewBottomConstraint.constant
                         self.view.layoutIfNeeded()
+                    } completion: { (_) in
+                        //end.
                     }
                 }