mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fixes Article nav/tool bar behaviour
Now consistent with Feed and Timeline
This commit is contained in:
@@ -101,6 +101,7 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable {
|
||||
])
|
||||
fullScreenTapZone.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(didTapNavigationBar)))
|
||||
navigationItem.titleView = fullScreenTapZone
|
||||
configureNavbar()
|
||||
|
||||
articleExtractorButton.addTarget(self, action: #selector(toggleArticleExtractor(_:)), for: .touchUpInside)
|
||||
toolbarItems?.insert(UIBarButtonItem(customView: articleExtractorButton), at: 6)
|
||||
@@ -229,6 +230,27 @@ class ArticleViewController: UIViewController, MainControllerIdentifiable {
|
||||
|
||||
}
|
||||
|
||||
override func contentScrollView(for edge: NSDirectionalRectEdge) -> UIScrollView? {
|
||||
return currentWebViewController?.webView?.scrollView
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
// MARK: Notifications
|
||||
|
||||
@objc dynamic func unreadCountDidChange(_ notification: Notification) {
|
||||
|
||||
@@ -31,7 +31,7 @@ class WebViewController: UIViewController {
|
||||
private var topShowBarsViewConstraint: NSLayoutConstraint!
|
||||
private var bottomShowBarsViewConstraint: NSLayoutConstraint!
|
||||
|
||||
private var webView: PreloadedWebView? {
|
||||
var webView: PreloadedWebView? {
|
||||
return view.subviews[0] as? PreloadedWebView
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user