mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Change the full screen tap zone to be the center of the navigation bar instead of the whole navigation bar. Issue #1450.
This commit is contained in:
@@ -8,10 +8,6 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
protocol InteractiveNavigationControllerTappable {
|
||||
func didTapNavigationBar()
|
||||
}
|
||||
|
||||
class InteractiveNavigationController: UINavigationController {
|
||||
|
||||
private let poppableDelegate = PoppableGestureRecognizerDelegate()
|
||||
@@ -33,8 +29,6 @@ class InteractiveNavigationController: UINavigationController {
|
||||
poppableDelegate.originalDelegate = interactivePopGestureRecognizer?.delegate
|
||||
poppableDelegate.navigationController = self
|
||||
interactivePopGestureRecognizer?.delegate = poppableDelegate
|
||||
|
||||
navigationBar.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(didTapNavigationBar)))
|
||||
}
|
||||
|
||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
@@ -44,13 +38,7 @@ class InteractiveNavigationController: UINavigationController {
|
||||
}
|
||||
}
|
||||
|
||||
@objc func didTapNavigationBar() {
|
||||
if let tappable = topViewController as? InteractiveNavigationControllerTappable {
|
||||
tappable.didTapNavigationBar()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
|
||||
Reference in New Issue
Block a user