From 06442b5629a5d673f57c8f729effc8666c958962 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 28 Nov 2019 21:51:24 -0500 Subject: [PATCH] Fix controls in large image/gallery not hiding/showing on zoom Closes #58 --- .../Large Image/LargeImageViewController.swift | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Tusker/Screens/Large Image/LargeImageViewController.swift b/Tusker/Screens/Large Image/LargeImageViewController.swift index 69e42c6fb8..457208357f 100644 --- a/Tusker/Screens/Large Image/LargeImageViewController.swift +++ b/Tusker/Screens/Large Image/LargeImageViewController.swift @@ -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 }