iOS 17 - SwiftUI push navigation animations start breaking

24 Views Asked by At

My code works well till iOS 16. But Push Navigations start breaking on iOS 17. The line delegate = self breaks my push navigation animations. (giving jerk instead of smooth right to left animation)

extension UINavigationController: UIGestureRecognizerDelegate, UINavigationControllerDelegate {
    override open func viewDidLoad() {
        super.viewDidLoad()
        interactivePopGestureRecognizer?.delegate = self
        delegate = self
    }
    
    public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
        return viewControllers.count > 1
    }

    public func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
        // I require to add some code here
    }
}
0

There are 0 best solutions below