Prevent the three panel configuration code from being called too fast when entering the background

This commit is contained in:
Maurice Parker 2019-09-09 20:24:35 -05:00
parent 35226b4af9
commit 8a018acc00
1 changed files with 3 additions and 1 deletions

View File

@ -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)
}
})
}