mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00

- The nav bar buttons are now implemented in a NSToolbar. - The popovers work as expected from those buttons. - Even supports different positions when the sidebar is hidden.
37 lines
1.1 KiB
Swift
37 lines
1.1 KiB
Swift
//
|
|
// SplitViewController.swift
|
|
// NewsBlur
|
|
//
|
|
// Created by David Sinclair on 2020-08-27.
|
|
// Copyright © 2020 NewsBlur. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
/// Subclass of `UISplitViewController` to enable customizations.
|
|
class SplitViewController: UISplitViewController {
|
|
@objc var isFeedListHidden: Bool {
|
|
return [.oneBesideSecondary, .oneOverSecondary, .secondaryOnly].contains(displayMode)
|
|
}
|
|
|
|
/// Update the theme of the split view controller.
|
|
@objc func updateTheme() {
|
|
|
|
}
|
|
|
|
override var preferredStatusBarStyle: UIStatusBarStyle {
|
|
print("preferredStatusBarStyle: \(ThemeManager.shared.isDarkTheme ? "light" : "dark")")
|
|
|
|
return ThemeManager.shared.isDarkTheme ? .lightContent : .darkContent
|
|
}
|
|
|
|
override var childForStatusBarStyle: UIViewController? {
|
|
return nil
|
|
}
|
|
|
|
// Can do menu validation here.
|
|
// override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool {
|
|
// print("canPerformAction: \(action) with \(sender ?? "nil")")
|
|
// return true
|
|
// }
|
|
}
|