From 7cdc0d375b11b614cc05fa8deec4ddc383577d67 Mon Sep 17 00:00:00 2001 From: Robin Enhorn Date: Thu, 7 Nov 2019 15:18:55 +0100 Subject: [PATCH] Catalyst updates --- Presentation/DualNavigationControllersSplitDelegate.swift | 4 ++++ Presentation/UISplitViewController+Presenting.swift | 1 + 2 files changed, 5 insertions(+) diff --git a/Presentation/DualNavigationControllersSplitDelegate.swift b/Presentation/DualNavigationControllersSplitDelegate.swift index 902b119..ad385bf 100644 --- a/Presentation/DualNavigationControllersSplitDelegate.swift +++ b/Presentation/DualNavigationControllersSplitDelegate.swift @@ -48,7 +48,11 @@ open class DualNavigationControllersSplitDelegate: NSObject, UISplitViewControll /// Returns a signal that will signal when collapsing or expanding. Current value can be nil if the collapsed state cannot be determined reliably yet. public var isCollapsed: ReadSignal { + #if targetEnvironment(macCatalyst) + return ReadSignal(false) + #else return isCollapsedProperty.readOnly() + #endif } internal func makeMasterNavigationController(_ splitController: UISplitViewController) -> UINavigationController { diff --git a/Presentation/UISplitViewController+Presenting.swift b/Presentation/UISplitViewController+Presenting.swift index 3112991..0ef8a5f 100644 --- a/Presentation/UISplitViewController+Presenting.swift +++ b/Presentation/UISplitViewController+Presenting.swift @@ -48,6 +48,7 @@ extension UISplitViewController: PresentingViewController { } presenter = nc viewControllers = [ nc ] + viewControllers.dropFirst() + _ = self.delegate?.targetDisplayModeForAction?(in: self) default: fatalError("Not supported") }