|
@@ -200,6 +200,14 @@ class NCViewerImageZoom: UIViewController {
|
|
self.updateZoomScale()
|
|
self.updateZoomScale()
|
|
self.centreConstraints()
|
|
self.centreConstraints()
|
|
}
|
|
}
|
|
|
|
+ } else if detailView.isSavedContraint() {
|
|
|
|
+ UIView.animate(withDuration: 0.3) {
|
|
|
|
+ self.imageViewTopConstraint.constant = self.detailView.imageViewTopConstraintConstant
|
|
|
|
+ self.imageViewBottomConstraint.constant = self.detailView.imageViewBottomConstraintConstant
|
|
|
|
+ self.detailViewTopConstraint.constant = self.detailView.detailViewTopConstraintConstant
|
|
|
|
+ self.view.layoutIfNeeded()
|
|
|
|
+ } completion: { (_) in
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
case .changed:
|
|
case .changed:
|
|
@@ -231,11 +239,14 @@ class NCViewerImageZoom: UIViewController {
|
|
self.detailViewTopConstraint.constant = -self.imageViewBottomConstraint.constant
|
|
self.detailViewTopConstraint.constant = -self.imageViewBottomConstraint.constant
|
|
self.view.layoutIfNeeded()
|
|
self.view.layoutIfNeeded()
|
|
} completion: { (_) in
|
|
} completion: { (_) in
|
|
- //end.
|
|
|
|
|
|
+ // Save detail constraints
|
|
|
|
+ self.detailView.imageViewTopConstraintConstant = self.imageViewTopConstraint.constant
|
|
|
|
+ self.detailView.imageViewBottomConstraintConstant = self.imageViewBottomConstraint.constant
|
|
|
|
+ self.detailView.detailViewTopConstraintConstant = self.detailViewTopConstraint.constant
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- detailView.show(textColor: self.viewerImage?.textColor)
|
|
|
|
|
|
+ //detailView.show(textColor: self.viewerImage?.textColor)
|
|
}
|
|
}
|
|
|
|
|
|
// CLOSE DETAIL
|
|
// CLOSE DETAIL
|