|
@@ -214,29 +214,21 @@ class NCViewerImageZoom: UIViewController {
|
|
|
|
|
|
// OPEN DETAIL
|
|
// OPEN DETAIL
|
|
if imageView.center.y < view.center.y - 50 {
|
|
if imageView.center.y < view.center.y - 50 {
|
|
-
|
|
|
|
- detailView.show(textColor: self.viewerImage?.textColor)
|
|
|
|
-
|
|
|
|
- /*
|
|
|
|
- if detailView.isHidden {
|
|
|
|
-
|
|
|
|
- let detailHeight = self.detailView.frame.height
|
|
|
|
- let top = (self.startImageViewTopConstraint + currentLocation.y) - detailHeight
|
|
|
|
- let bottom = self.startImageViewBottomConstraint - top
|
|
|
|
-
|
|
|
|
- detailView.show(textColor: self.viewerImage?.textColor)
|
|
|
|
- gestureRecognizer.state = .ended
|
|
|
|
-
|
|
|
|
- UIView.animate(withDuration: 1) {
|
|
|
|
- self.imageViewTopConstraint.constant = top
|
|
|
|
- //self.imageViewBottomConstraint.constant = bottom
|
|
|
|
- self.detailViewTopConstraint.constant = -self.imageViewBottomConstraint.constant
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
|
|
+
|
|
|
|
+ if detailView.isHidden {
|
|
|
|
+
|
|
|
|
+ detailView.show(textColor: self.viewerImage?.textColor)
|
|
|
|
+ gestureRecognizer.state = .ended
|
|
|
|
|
|
- detailView.show(textColor: self.viewerImage?.textColor)
|
|
|
|
- }
|
|
|
|
- */
|
|
|
|
|
|
+ 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.view.layoutIfNeeded()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ detailView.show(textColor: self.viewerImage?.textColor)
|
|
}
|
|
}
|
|
|
|
|
|
// CLOSE DETAIL
|
|
// CLOSE DETAIL
|