Fix show sidebar button not appearing on iPad

This commit is contained in:
Shadowfacts 2022-09-10 13:32:18 -04:00
parent 6fa71bee38
commit 57cc5ac5a5
1 changed files with 8 additions and 0 deletions

View File

@ -45,7 +45,15 @@ class AppSplitViewController: UISplitViewController {
setViewController(sidebarNav, for: .primary)
secondaryNav = UINavigationController()
#if targetEnvironment(macCatalyst)
secondaryNav.isNavigationBarHidden = true
#else
// the toggle sidebar button only appears if there's a navigation bar
// so we just make always transparent, rather than disabling it
let secondaryNavBarAppearance = UINavigationBarAppearance()
secondaryNavBarAppearance.configureWithTransparentBackground()
secondaryNav.navigationBar.standardAppearance = secondaryNavBarAppearance
#endif
secondaryNav.view.backgroundColor = .appBackground
setViewController(secondaryNav, for: .secondary)