Only hide toolbar in debug log

Split view controller is shi**y enough not to handle navigation
bar properly on rotation.

When in compact mode, the navigation bar comes from the split
view controller. Hiding it and then going to regular (landscape),
will leave the master without the navigation bar and no way to
restore it.
This commit is contained in:
Davide De Rosa 2019-04-30 14:02:09 +02:00
parent 6ecf859a5e
commit 634f34405b
1 changed files with 4 additions and 3 deletions

View File

@ -76,9 +76,10 @@ class DebugLogViewController: UIViewController {
// MARK: Actions
@objc private func toggleBars() {
let isHidden = navigationController?.isToolbarHidden ?? true
navigationController?.setNavigationBarHidden(!isHidden, animated: true)
navigationController?.setToolbarHidden(!isHidden, animated: true)
let nav = navigationController
let isHidden = nav?.isToolbarHidden ?? true
// nav?.setNavigationBarHidden(!isHidden, animated: true)
nav?.setToolbarHidden(!isHidden, animated: true)
}
@IBAction private func share(_ sender: Any?) {