mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Navigation/Toolbar Appearance
Consistent behaviour for Feed and Timeline toolbars.
This commit is contained in:
@@ -93,6 +93,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
refreshControl!.addTarget(self, action: #selector(refreshAccounts(_:)), for: .valueChanged)
|
||||
|
||||
configureToolbar()
|
||||
configureNavbar()
|
||||
resetUI(resetScroll: true)
|
||||
|
||||
// Load the table and then scroll to the saved position if available
|
||||
@@ -621,6 +622,22 @@ private extension MasterTimelineViewController {
|
||||
let refreshProgressItemButton = UIBarButtonItem(customView: refreshProgressView)
|
||||
toolbarItems?.insert(refreshProgressItemButton, at: 2)
|
||||
}
|
||||
|
||||
func configureNavbar() {
|
||||
let scrollEdge = UINavigationBarAppearance()
|
||||
scrollEdge.configureWithOpaqueBackground()
|
||||
scrollEdge.shadowColor = nil
|
||||
scrollEdge.shadowImage = UIImage()
|
||||
|
||||
let standard = UINavigationBarAppearance()
|
||||
standard.shadowColor = .opaqueSeparator
|
||||
standard.shadowImage = UIImage()
|
||||
|
||||
navigationController?.navigationBar.standardAppearance = standard
|
||||
navigationController?.navigationBar.compactAppearance = standard
|
||||
navigationController?.navigationBar.scrollEdgeAppearance = scrollEdge
|
||||
navigationController?.navigationBar.compactScrollEdgeAppearance = scrollEdge
|
||||
}
|
||||
|
||||
func resetUI(resetScroll: Bool) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user