I'm curious what the intended behavior is here? Is swipe navigation meant to be suppressed if the back button is hidden? I have a scenario where I'm trying to use a custom-drawn navigation bar, but actually WANT the swipe action to still work. Is that possible (outside of using a .zoom transition - which may, or may not, be a bug).
Edit: Found this work around for what I want -
extension UINavigationController: @retroactive UIGestureRecognizerDelegate {
override open func viewDidLoad() {
super.viewDidLoad()
interactivePopGestureRecognizer?.delegate = self
}
public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
// Override this to cause the navigation controller to do the back swipe even if the navigation bar is hidden
return viewControllers.count > 1
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: