From e26f20449c714522a05b527335ed38b459ad99a8 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 23 Nov 2019 11:07:40 -0600 Subject: [PATCH] Adjusted so that tap zones only appear for fullscreen. Issue #1331 --- iOS/Article/ArticleViewController.swift | 6 ++++++ iOS/Base.lproj/Main.storyboard | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/iOS/Article/ArticleViewController.swift b/iOS/Article/ArticleViewController.swift index 5f67abd26..c9f3827f4 100644 --- a/iOS/Article/ArticleViewController.swift +++ b/iOS/Article/ArticleViewController.swift @@ -36,6 +36,8 @@ class ArticleViewController: UIViewController { @IBOutlet private weak var webViewContainer: UIView! @IBOutlet private weak var showNavigationView: UIView! @IBOutlet private weak var showToolbarView: UIView! + @IBOutlet private weak var showNavigationViewConstraint: NSLayoutConstraint! + @IBOutlet private weak var showToolbarViewConstraint: NSLayoutConstraint! private var articleExtractorButton: ArticleExtractorButton = { let button = ArticleExtractorButton(type: .system) @@ -478,6 +480,8 @@ private extension ArticleViewController { func showBars() { if traitCollection.userInterfaceIdiom == .phone && coordinator.isRootSplitCollapsed { coordinator.showStatusBar() + showNavigationViewConstraint.constant = 0 + showToolbarViewConstraint.constant = 0 navigationController?.setNavigationBarHidden(false, animated: true) navigationController?.setToolbarHidden(false, animated: true) } @@ -486,6 +490,8 @@ private extension ArticleViewController { func hideBars() { if traitCollection.userInterfaceIdiom == .phone && coordinator.isRootSplitCollapsed { coordinator.hideStatusBar() + showNavigationViewConstraint.constant = 44.0 + showToolbarViewConstraint.constant = 44.0 navigationController?.setNavigationBarHidden(true, animated: true) navigationController?.setToolbarHidden(true, animated: true) } diff --git a/iOS/Base.lproj/Main.storyboard b/iOS/Base.lproj/Main.storyboard index 61184ea2b..276aee563 100644 --- a/iOS/Base.lproj/Main.storyboard +++ b/iOS/Base.lproj/Main.storyboard @@ -21,14 +21,14 @@ - + - + @@ -37,14 +37,14 @@ - + - + @@ -121,7 +121,9 @@ + +