From 6f51f321f626e4931431584a56649c915339c962 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 25 Feb 2023 15:15:00 -0500 Subject: [PATCH] Fix VC restored to secondary split nav missing Close button --- Tusker/Screens/Utilities/SplitNavigationController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tusker/Screens/Utilities/SplitNavigationController.swift b/Tusker/Screens/Utilities/SplitNavigationController.swift index b5d24be9..0d2c0a19 100644 --- a/Tusker/Screens/Utilities/SplitNavigationController.swift +++ b/Tusker/Screens/Utilities/SplitNavigationController.swift @@ -304,6 +304,12 @@ private class SplitSecondaryNavigationController: EnhancedNavigationViewControll } } + override func pushViewController(_ viewController: UIViewController, animated: Bool) { + super.pushViewController(viewController, animated: animated) + + configureSecondarySplitCloseButton(for: viewControllers.first!) + } + private func configureSecondarySplitCloseButton(for viewController: UIViewController) { guard viewController.navigationItem.leftBarButtonItem?.tag != ViewTags.splitNavCloseSecondaryButton else { return