浏览代码

clear code

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.
                     }
                 }