forked from shadowfacts/Tusker
Fix controls in large image/gallery not hiding/showing on zoom
Closes #58
This commit is contained in:
parent
d5232c0b03
commit
06442b5629
|
@ -71,16 +71,6 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate {
|
|||
modalPresentationStyle = .fullScreen
|
||||
}
|
||||
|
||||
// init(gifData: Data?, description: String?, sourceFrame: CGRect, sourceCornerRadius: CGFloat, router: AppRouter) {
|
||||
// self.router = router
|
||||
// self.gifData = gifData
|
||||
// self.imageDescription = description
|
||||
// self.originFrame = sourceFrame
|
||||
// self.originCornerRadius = sourceCornerRadius
|
||||
//
|
||||
// super.init(nibName: "LargeImageViewController", bundle: nil)
|
||||
// }
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
@ -172,9 +162,9 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate {
|
|||
|
||||
let prevZoomScale = self.prevZoomScale ?? scrollView.minimumZoomScale
|
||||
if scrollView.zoomScale <= scrollView.minimumZoomScale {
|
||||
controlsVisible = true
|
||||
setControlsVisible(true, animated: true)
|
||||
} else if scrollView.zoomScale > prevZoomScale {
|
||||
controlsVisible = false
|
||||
setControlsVisible(false, animated: true)
|
||||
}
|
||||
self.prevZoomScale = scrollView.zoomScale
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue