Reformat statement

This commit is contained in:
Maurice Parker 2019-08-03 13:24:51 -05:00
parent 9768d8ca55
commit 43d0d0c889
1 changed files with 7 additions and 5 deletions

View File

@ -75,7 +75,9 @@ class AppCoordinator: NSObject, UndoableCommandRunner {
}
var isThreePanelMode: Bool {
return rootSplitViewController.traitCollection.userInterfaceIdiom == .pad && !rootSplitViewController.isCollapsed && rootSplitViewController.displayMode == .allVisible
return rootSplitViewController.traitCollection.userInterfaceIdiom == .pad &&
!rootSplitViewController.isCollapsed &&
rootSplitViewController.displayMode == .allVisible
}
var rootNode: Node {
@ -607,14 +609,14 @@ class AppCoordinator: NSObject, UndoableCommandRunner {
extension AppCoordinator: UISplitViewControllerDelegate {
func splitViewController(_ svc: UISplitViewController, willChangeTo displayMode: UISplitViewController.DisplayMode) {
guard rootSplitViewController.traitCollection.userInterfaceIdiom == .pad && !rootSplitViewController.isCollapsed else {
func splitViewController(_ splitViewController: UISplitViewController, willChangeTo displayMode: UISplitViewController.DisplayMode) {
guard splitViewController.traitCollection.userInterfaceIdiom == .pad && !splitViewController.isCollapsed else {
return
}
if rootSplitViewController.displayMode != .allVisible && displayMode == .allVisible {
if splitViewController.displayMode != .allVisible && displayMode == .allVisible {
transitionToThreePanelMode()
}
if rootSplitViewController.displayMode == .allVisible && displayMode != .allVisible {
if splitViewController.displayMode == .allVisible && displayMode != .allVisible {
transitionFromThreePanelMode()
}
}