Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在使用这个路由的情况下,有部分概率出现界面未 push 成功,Lookin 能看到显示顶层的空白界面 #1

Open
starrymood opened this issue Aug 25, 2023 · 4 comments

Comments

@starrymood
Copy link

No description provided.

@zgjff
Copy link
Owner

zgjff commented Aug 28, 2023

目标控制器显示展示方式代码能看下吗?

@starrymood
Copy link
Author

func showDetail(withMatchRouterResult _: JJKit.JJRouter.MatchResult, from sourceController: UIViewController) {
sourceController.navigationController?.pushViewController(self, animated: true)
}
这种使用方法,我发现是偶发性的,页面 Push 不成功有一点的触发性。

@zgjff
Copy link
Owner

zgjff commented Dec 18, 2023

我也出现过, 找到了下面这个博客
https://www.clcoder.com/2021/03/12/iOS%20interactivePopGestureRecognizer卡住&手势滑动监听/

我在项目中添加如下逻辑,再也没出现过了

open class CustomeGesNavigationController: UINavigationController, UIGestureRecognizerDelegate{
    open override func viewDidLoad() {
        super.viewDidLoad()
        self.interactivePopGestureRecognizer?.delegate = self
    }
    
    /// 设置侧滑手势
    public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool
    {
        if  self.viewControllers.count <= 1 { return false }
        return true
    }
}

@zgjff
Copy link
Owner

zgjff commented Dec 18, 2023

func showDetail(withMatchRouterResult _: JJKit.JJRouter.MatchResult, from sourceController: UIViewController) { sourceController.navigationController?.pushViewController(self, animated: true) } 这种使用方法,我发现是偶发性的,页面 Push 不成功有一点的触发性。

试下下上面的代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants