From d321c317766aa78d0bcc16aa7d20f15a8d2c2d77 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 21 Aug 2024 16:23:05 -0400 Subject: [PATCH] Implement more protocols for AdaptableNavigationController --- .../Utilities/AdaptableNavigationController.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tusker/Screens/Utilities/AdaptableNavigationController.swift b/Tusker/Screens/Utilities/AdaptableNavigationController.swift index 0a39fcab..145e75cd 100644 --- a/Tusker/Screens/Utilities/AdaptableNavigationController.swift +++ b/Tusker/Screens/Utilities/AdaptableNavigationController.swift @@ -134,3 +134,17 @@ extension AdaptableNavigationController: NavigationControllerProtocol { } } } + +@available(iOS 17.0, *) +extension AdaptableNavigationController: BackgroundableViewController { + func sceneDidEnterBackground() { + (topViewController as? BackgroundableViewController)?.sceneDidEnterBackground() + } +} + +@available(iOS 17.0, *) +extension AdaptableNavigationController: StatusBarTappableViewController { + func handleStatusBarTapped(xPosition: CGFloat) -> StatusBarTapActionResult { + (topViewController as? StatusBarTappableViewController)?.handleStatusBarTapped(xPosition: xPosition) ?? .continue + } +}