From b86b46a21dc106a3437532f139b1cf8c2b03f5a0 Mon Sep 17 00:00:00 2001 From: Maurice Carrier Date: Thu, 23 Oct 2025 14:35:41 -0400 Subject: [PATCH 1/2] PP-3142 - properly manage nav/tab bar dismissal --- .../CatalogUI/Views/CatalogContentView.swift | 1 - Palace/Reader2/UI/TPPEPUBViewController.swift | 23 +++---------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Palace/CatalogUI/Views/CatalogContentView.swift b/Palace/CatalogUI/Views/CatalogContentView.swift index cd120aea3..77d6585fc 100644 --- a/Palace/CatalogUI/Views/CatalogContentView.swift +++ b/Palace/CatalogUI/Views/CatalogContentView.swift @@ -20,7 +20,6 @@ struct CatalogContentView: View { } } .padding(.vertical, 17) - .padding(.bottom, 100) } .refreshable { await viewModel.refresh() } .onReceive(viewModel.$shouldScrollToTop) { shouldScroll in diff --git a/Palace/Reader2/UI/TPPEPUBViewController.swift b/Palace/Reader2/UI/TPPEPUBViewController.swift index ae0a56001..ee411f0c5 100644 --- a/Palace/Reader2/UI/TPPEPUBViewController.swift +++ b/Palace/Reader2/UI/TPPEPUBViewController.swift @@ -78,24 +78,7 @@ class TPPEPUBViewController: TPPBaseReaderViewController { override func updateNavigationBar(animated: Bool = true) { super.updateNavigationBar(animated: animated) - let navHidden = navigationController?.isNavigationBarHidden ?? false - tabBarController?.tabBar.isHidden = navHidden - - if !navHidden, let tabBar = tabBarController?.tabBar { - if #available(iOS 13.0, *) { - let appearance = UITabBarAppearance() - appearance.configureWithOpaqueBackground() - appearance.backgroundColor = TPPConfiguration.backgroundColor() - tabBar.standardAppearance = appearance - if #available(iOS 15.0, *) { - tabBar.scrollEdgeAppearance = appearance - } - } else { - tabBar.barTintColor = TPPConfiguration.backgroundColor() - } - tabBar.isTranslucent = false - tabBar.tintColor = TPPConfiguration.iconColor() - } + tabBarController?.tabBar.isHidden = navigationController?.isNavigationBarHidden ?? false } override func viewWillAppear(_ animated: Bool) { @@ -103,7 +86,8 @@ class TPPEPUBViewController: TPPBaseReaderViewController { setUIColor(for: preferences) log(.info, "TPPEPUBViewController will appear. UI color set based on preferences.") epubNavigator.submitPreferences(preferences) - + tabBarController?.tabBar.isHidden = true + if navigationItem.leftBarButtonItem == nil { let backItem = UIBarButtonItem(image: UIImage(systemName: "chevron.left"), style: .plain, target: self, action: #selector(closeEPUB)) navigationItem.leftBarButtonItem = backItem @@ -113,7 +97,6 @@ class TPPEPUBViewController: TPPBaseReaderViewController { navigationController?.setNavigationBarHidden(true, animated: false) navigationController?.setToolbarHidden(true, animated: false) - tabBarController?.tabBar.isHidden = true } @objc private func closeEPUB() { From 35ee22a8ae675c36ffa8a9019b3170a4f4141665 Mon Sep 17 00:00:00 2001 From: Maurice Carrier Date: Thu, 23 Oct 2025 14:36:13 -0400 Subject: [PATCH 2/2] Update project.pbxproj --- Palace.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Palace.xcodeproj/project.pbxproj b/Palace.xcodeproj/project.pbxproj index 16ce8affa..6cd8ccb44 100644 --- a/Palace.xcodeproj/project.pbxproj +++ b/Palace.xcodeproj/project.pbxproj @@ -4731,7 +4731,7 @@ CODE_SIGN_IDENTITY = "Apple Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 395; + CURRENT_PROJECT_VERSION = 397; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4790,7 +4790,7 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR; CODE_SIGN_ENTITLEMENTS = Palace/SimplyE.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 395; + CURRENT_PROJECT_VERSION = 397; DEVELOPMENT_TEAM = 88CBA74T8K; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO; @@ -4974,7 +4974,7 @@ CODE_SIGN_ENTITLEMENTS = Palace/PalaceDebug.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 396; + CURRENT_PROJECT_VERSION = 397; DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -5035,7 +5035,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 396; + CURRENT_PROJECT_VERSION = 397; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 88CBA74T8K; ENABLE_BITCODE = NO;