diff --git a/Tusker/Screens/Large Image/LargeImageViewController.swift b/Tusker/Screens/Large Image/LargeImageViewController.swift index 8cdb2e7391..7661a6bf25 100644 --- a/Tusker/Screens/Large Image/LargeImageViewController.swift +++ b/Tusker/Screens/Large Image/LargeImageViewController.swift @@ -43,6 +43,8 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate { var controlsVisible = true { didSet { + setNeedsUpdateOfHomeIndicatorAutoHidden() + UIView.animate(withDuration: 0.2) { let topOffset = self.controlsVisible ? 0 : -self.topControlsView.bounds.height self.topControlsView.transform = CGAffineTransform(translationX: 0, y: topOffset) @@ -60,7 +62,11 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate { return true } - init(image: UIImage, description: String?, sourceFrame: CGRect, sourceCornerRadius: CGFloat) { + override var prefersHomeIndicatorAutoHidden: Bool { + return !controlsVisible + } + + init(image: UIImage, description: String?, sourceFrame: CGRect?, sourceCornerRadius: CGFloat?) { self.image = image self.imageDescription = description self.originFrame = sourceFrame