Skip to content
This repository was archived by the owner on Feb 13, 2019. It is now read-only.

Commit 62f6dbe

Browse files
committed
Close panels if needed in viewWillTransition(to size)
1 parent 7aa9897 commit 62f6dbe

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Terminal/Controller/ViewController.swift

+19
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,25 @@ class ViewController: UIViewController {
8181

8282
}
8383

84+
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
85+
super.viewWillTransition(to: size, with: coordinator)
86+
87+
coordinator.animate(alongsideTransition: { (context) in
88+
89+
}) { (context) in
90+
91+
if !self.allowFloatingPanels {
92+
self.closeAllFloatingPanels()
93+
}
94+
95+
if !self.allowPanelPinning {
96+
self.closeAllPinnedPanels()
97+
}
98+
99+
}
100+
101+
}
102+
84103
var didRequestReview = false
85104

86105
@objc

0 commit comments

Comments
 (0)