From 8a018acc0093e286a262c6a0b995d8dddba90db3 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Mon, 9 Sep 2019 20:24:35 -0500 Subject: [PATCH] Prevent the three panel configuration code from being called too fast when entering the background --- iOS/RootSplitViewController.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iOS/RootSplitViewController.swift b/iOS/RootSplitViewController.swift index 89fb623f3..63a1965ea 100644 --- a/iOS/RootSplitViewController.swift +++ b/iOS/RootSplitViewController.swift @@ -15,7 +15,9 @@ class RootSplitViewController: UISplitViewController { override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { coordinator.animate(alongsideTransition: { [weak self] context in - self?.coordinator.configureThreePanelMode(for: size) + if UIApplication.shared.applicationState != .background { + self?.coordinator.configureThreePanelMode(for: size) + } }) }