Fixes tapping buttons underneath navigation bar on SourceDetailViewController/AppViewController

This commit is contained in:
Riley Testut
2023-04-04 17:12:18 -05:00
committed by Magesh K
parent b2dcdc02c7
commit 7f2bd494b5
3 changed files with 31 additions and 2 deletions

View File

@@ -416,15 +416,17 @@ private extension AppViewController
// Copied from HeaderContentViewController
func updateNavigationBarAppearance(isHidden: Bool)
{
let barAppearance = self.navigationItem.standardAppearance ?? UINavigationBarAppearance()
let barAppearance = self.navigationItem.standardAppearance as? NavigationBarAppearance ?? NavigationBarAppearance()
if isHidden
{
barAppearance.configureWithTransparentBackground()
barAppearance.ignoresUserInteraction = true
}
else
{
barAppearance.configureWithDefaultBackground()
barAppearance.ignoresUserInteraction = false
}
barAppearance.titleTextAttributes = [.foregroundColor: UIColor.clear]