52inc / Pulley

A library to imitate the iOS 10 Maps UI.
https://cocoapods.org/pods/Pulley
MIT License
2.02k stars 265 forks source link

Pulley drawer dimming view appears after UINavigationViewController push new viewController #421

Open BGLv opened 2 years ago

BGLv commented 2 years ago

I created a small public project where we can clearly see that bug https://github.com/BGLv/PulleyDimmingViewBug

https://user-images.githubusercontent.com/22197990/146005651-9479f2fc-2b03-4204-9f06-d5491bf7e44b.mp4

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
        guard let windowScene = (scene as? UIWindowScene) else { return }
        let window = UIWindow(windowScene: windowScene)
        let mainVC = MainViewController()
        let pulleyVC = PulleyViewController(contentViewController: mainVC,
                                            drawerViewController: UIViewController())
        pulleyVC.initialDrawerPosition = .closed
        let navigationVC = UINavigationController(rootViewController: pulleyVC)
        mainVC.onNextButtonPressed = { [weak navigationVC] in
            let nextVC = UIViewController()
            nextVC.view.backgroundColor = .blue
            navigationVC?.pushViewController(nextVC, animated: true)
        }
        self.window = window
        window.rootViewController = navigationVC
        window.makeKeyAndVisible()
    }