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

自定义pop手饰冲突 #325

Closed
YaoJuan opened this issue May 4, 2018 · 4 comments
Closed

自定义pop手饰冲突 #325

YaoJuan opened this issue May 4, 2018 · 4 comments

Comments

@YaoJuan
Copy link

YaoJuan commented May 4, 2018

请填写运行环境
设备:iPhone7 真机
系统:iOS 11.3.
Xcode 版本:9.3
QMUI iOS 版本:2.6.1
请描述具体问题
由于原生的pop手饰只能在屏幕左侧才能有效,项目需求是需要全屏都有这个左滑返回的手饰,而且QMUINavigationController有些功能很好用,于是我就创建一个navigationController继承自QMUINavigationController,然后自定义了一个手饰,让他触发原生的手饰方法,并且扩大的作用范围,于是有这个效果了。但是就会出现下面截图的crash了。

相关截图(断点的堆栈、控制台的 log)
reason: '-[STBaseNavigationController handleNavigationTransition:]: unrecognized selector sent to instance 0x122044800'
原生的手饰就是触发的这个handleNavigationTransition方法。

我查看了qmui的代码是y因为qmui把之前的delegate换成了自定义的,但是由于自定的代理没有这个方法了。所以导致crash
// self.interactivePopGestureRecognizer.delegate = (id)self;

@MoLice
Copy link
Collaborator

MoLice commented May 5, 2018

问题描述似乎有点过于精简,建议贴出关键代码或者截图,注意不要缩写,我猜不出来...

@YaoJuan
Copy link
Author

YaoJuan commented May 7, 2018

@MoLice 好的,对不起,重新编辑过了

@YaoJuan
Copy link
Author

YaoJuan commented May 24, 2018

@MoLice 不好意思,刚才提交一个提交错了。本来是想自己fork本地改给自己项目用的,刚玩,不太会。sorry

@MoLice MoLice closed this as completed Jul 2, 2018
@MoLice MoLice reopened this Jul 2, 2018
@MoLice MoLice closed this as completed Oct 27, 2018
@likeSo
Copy link

likeSo commented Feb 21, 2019

你好,我也遇到这个问题了,这个问题具体表现为,我们使用下面这段代码来实现全屏幕手势返回(将系统的屏幕边缘手势替换为普通的滑动手势):

let target = self.interactivePopGestureRecognizer?.delegate
        // create a pan gesture and execute system screen-edge gesure's method
        let panGesture = UIPanGestureRecognizer(target: target, action: Selector(("handleNavigationTransition:")))
        // handle pan gesture and process gestures's priority
        panGesture.delegate = self
        self.view.addGestureRecognizer(panGesture)
        self.interactivePopGestureRecognizer?.isEnabled = false

但是pod引入了QMUIKit之后,滑动返回时报错:-[UINavigationController handleNavigationTransition:]: unrecognized selector sent to instance,原因应该就是 @YaoJuan 描述的那样,他已经在他的fork内修改了。
请问官方能提供相关修复吗? @MoLice

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

3 participants