소스 검색

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