NewsBlur/clients/ios/Classes/SplitViewController.swift
David Sinclair 46bdd7214f #1247 (Mac Catalyst edition)
- 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.
2024-01-18 22:07:39 -05:00

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
// }
}