GitHub user emptywalker opened a pull request:

    https://github.com/apache/incubator-weex/pull/267

    修复iOS SDK添加系统返回手势的bug

    
这是一个早期修改右滑手势返回留下的bug,我在源仓库中提过一个[pr](https://github.com/alibaba/weex/pull/2667),但是并没有被合并到主仓库中,目前发现这bug依然存在。希望能够解决一下。
    
    
    ### 之前的描述如下
    -----
    ### 描述
    
在[#2433](https://github.com/alibaba/weex/pull/2433)中,我将sdk中添加
用来右滑返回的手势,更换成系统提供的方式,但是在最近的开发中,发现这种添åŠ
 æ–¹å¼å­˜åœ¨ä»¥ä¸‹é—®é¢˜ï¼š
      
在WXBaseViewController中设置navigationController.interactivePopGestureRecognizer.delegate,每次创建baseVC对象时,那么delegate都会指向这个新的baseVC,导致了navigator的手势效果始终都只有æ
 ˆé¡¶çš„baseVC有; 这样当æ 
ˆé¡¶çš„baseVC弹出后,navigationController.interactivePopGestureRecognizer.delegate=nil,导致了后面的baseVC都不能够使用手势返回;
 
    
    ### 解决方案
    为了保证interactivePopGestureRecognizer的代理始终存在,将å…
¶è®¾ç½®åœ¨WXRootViewController的viewDidLoad()中,保证这个手势的delegate始终都不会为nil,这æ
 ·ä¹Ÿé™ä½Žäº†WXBaseVC每次都去增加手势的任务
    ### 提醒
    
如果是在项目中集成weex页面的,也只需在本地项目中的navigationController的viewDidLoad()中,设置interactivePopGestureRecognizer代理即可
      

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/emptywalker/incubator-weex dev

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/267.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #267
    
----
commit 8c2b6a2956475ab50fd3b64dcde9c3d105ee788f
Author: xuyouhong <[email protected]>
Date:   2017-04-17T07:29:59Z

    --

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to